Range.AutoFormat Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Automatically formats the specified range, using a predefined format.
public object AutoFormat (Microsoft.Office.Interop.Excel.XlRangeAutoFormat Format = Microsoft.Office.Interop.Excel.XlRangeAutoFormat.xlRangeAutoFormatClassic1, object Number, object Font, object Alignment, object Border, object Pattern, object Width);
Public Function AutoFormat (Optional Format As XlRangeAutoFormat = Microsoft.Office.Interop.Excel.XlRangeAutoFormat.xlRangeAutoFormatClassic1, Optional Number As Object, Optional Font As Object, Optional Alignment As Object, Optional Border As Object, Optional Pattern As Object, Optional Width As Object) As Object
Parameters
- Format
- XlRangeAutoFormat
Optional XlRangeAutoFormat. The specified AutoFormat.Some of the XlRangeAutoFormat constants may not be available to you, depending on the language support (U.S. English, for example) that you’ve selected or installed.
- Number
- Object
Optional Object. True to include number formats in the AutoFormat. The default value is True.
- Font
- Object
Optional Object. True to include font formats in the AutoFormat. The default value is True.
- Alignment
- Object
Optional Object. True to include alignment in the AutoFormat. The default value is True.
- Border
- Object
Optional Object. True to include border formats in the AutoFormat. The default value is True.
- Pattern
- Object
Optional Object. True to include pattern formats in the AutoFormat. The default value is True.
- Width
- Object
Optional Object. True to include column width and row height in the AutoFormat. The default value is True.
Returns
Remarks
If the range is a single cell, this method also formats the active region surrounding the cell.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應