Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.0   7.1   7.2   7.3   7.4   7.5   8.0   8.1   8.2   8.3    Statistic  

XL.Sheet.SetCellFormats

Set cell formats in given area.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
XL 8.0 Yes Yes Yes Yes Yes

MBS( "XL.Sheet.SetCellFormats"; bookRef; sheetIndex; First row; Last row; First column; Last column; Formats { ; Row Delimiter; Column Delimiter } )

Parameters

Parameter Description Example value
bookRef The reference to the workbook. Please use XL.LoadBook to load a file. $ref
sheetIndex The index of the sheet. This number ranges from 0 to XL.Book.SheetCount-1. 0
First row The first row to process. First row has index 0. 3
Last row The last row to process. First row has index 0. 6
First column The first column to process. First column has index 0. 2
Last column The last column to process. First column has index 0. 4
Formats The format to use.
Can be separated with row and column delimiter to give each row and column a different format.
But you can also use same format for all rows or for all columns.
$dollarFormat
Row Delimiter Optional
The row delimiter for the result.
Default is new line character.
"¶"
Column Delimiter Optional
The column delimiter for the result.
Default is tab character.
char(9)

Result

Returns number of errors or error.

Description

Set cell formats in given area.

Examples

Write bold row and data rows:

# create bold font & format
Set Variable [ $boldFont ; Value: MBS( "XL.Book.AddFont"; $bookRef) ]
Set Variable [ $r ; Value: MBS( "XL.Font.SetBold"; $bookRef; $boldFont; 1) ]
Set Variable [ $boldFormat ; Value: MBS( "XL.Book.AddFormat"; $bookRef) ]
Set Variable [ $r ; Value: MBS( "XL.Format.SetFont"; $bookRef; $boldFormat; $boldFont) ]
# Write a title row
Set Variable [ $r ; Value: MBS( "XL.Sheet.CellWriteTexts"; $bookRef; $sheet; 1; 1; 1; 4; "A,B,C,D"; ¶; "," ) ]
# Make it bold
Set Variable [ $r ; Value: MBS( "XL.Sheet.SetCellFormats"; $bookRef; $sheet; 1; 1; 1; 4; $boldFormat ) ]
# and write data
Set Variable [ $r ; Value: MBS( "XL.Sheet.CellWriteTexts"; $bookRef; $sheet; 2; 5; 1; 4; $data; ¶; "," ) ]

See also


XL.Sheet.SetCellFormat   -   XL.Sheet.SetCol

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins