Platforms to show: All Mac Windows Linux Cross-Platform
Back to XLSheetMBS class.
XLSheetMBS.WriteBlank(row as Integer, col as Integer, format as XLFormatMBS = nil) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XL | MBS XL Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns false if error occurs. Get error info with XLBookMBS.ErrorMessage property.
Col and Row are zero based.
Please remember that Excel files have limits like 65536 rows and 256 columns.
Some examples using this method:
XLSheetMBS.WriteBoolean(row as Integer, col as Integer, value as boolean, format as XLFormatMBS = nil) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XL | MBS XL Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If format is nil then format is ignored.
Returns false if error occurs. Get error info with XLBookMBS.ErrorMessage property.
Col and Row are zero based.
Please remember that Excel files have limits like 65536 rows and 256 columns.
XLSheetMBS.WriteComment(row as Integer, col as Integer, value as string, author as string, width as Integer, height as Integer)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XL | MBS XL Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
row and col: cell's position
value: comment string
author: author string
width: width of text box in pixels
height: height of text box in pixels
Col and Row are zero based.
Please remember that Excel files have limits like 65536 rows and 256 columns.
XLSheetMBS.WriteDate(row as Integer, col as Integer, value as date, format as XLFormatMBS = nil) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XL | MBS XL Plugin | 15.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
If format is nil then format is ignored. Internally uses XLBookMBS.datePack() for packing date/time parts to double.
Returns false if error occurs. Get error info with XLBookMBS.ErrorMessage property.
Col and Row are zero based.
Please remember that Excel files have limits like 65536 rows and 256 columns.
XLSheetMBS.WriteDateTime(row as integer, col as integer, value as dateTime, format as XLFormatMBS = nil) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XL | MBS XL Plugin | 20.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If format is nil then format is ignored. Internally uses XLBookMBS.datePack() for packing date/time parts to double.
Returns false if error occurs. Get error info with XLBookMBS.ErrorMessage property.
Col and Row are zero based.
Please remember that Excel files have limits like 65536 rows and 256 columns.
XLSheetMBS.WriteError(row as Integer, col as Integer, Error as Integer, format as XLFormatMBS = nil)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XL | MBS XL Plugin | 16.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If format equals nil then format is ignored.
XLSheetMBS.WriteFormula(row as Integer, col as Integer, value as string, format as XLFormatMBS = nil) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XL | MBS XL Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If format is nil then format is ignored. Returns false if error occurs. Get error info with XLBookMBS.ErrorMessage property.
Col and Row are zero based.
Please remember that Excel files have limits like 65536 rows and 256 columns.
As LibXL does not calculate the result of the formula, it will not encode the result in the Excel file. It does only store the formula, so an app opening the file will have to do the calculation. But QuickLook on Mac OS X does not calculate, so results do not show there.
Examples for formulas are: "TODAY()", "IF(C1>0;ABS(C1*D1);"""")", "SUM(E16:E38)" or "E39+E39*E40".
Some examples using this method:
XLSheetMBS.WriteFormulaBool(row as Integer, col as Integer, Expression as string, value as Boolean, format as XLFormatMBS = nil) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XL | MBS XL Plugin | 16.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If format equals nil then format is ignored.
Returns false if error occurs. Get error info with XLBookMBS.errorMessage.
XLSheetMBS.WriteFormulaNum(row as Integer, col as Integer, Expression as string, value as Double, format as XLFormatMBS = nil) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XL | MBS XL Plugin | 16.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If format equals nil then format is ignored. Returns false if error occurs. Get error info with XLBookMBS.errorMessage.
XLSheetMBS.WriteFormulaString(row as Integer, col as Integer, Expression as string, value as String, format as XLFormatMBS = nil) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XL | MBS XL Plugin | 16.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If format equals nil then format is ignored. Returns false if error occurs. Get error info with XLBookMBS.errorMessage.
XLSheetMBS.WriteNumber(row as Integer, col as Integer, value as Double, format as XLFormatMBS = nil) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XL | MBS XL Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If format is nil then format is ignored. Use XLBookMBS.datePack() for packing date/time parts to double.
Returns false if error occurs. Get error info with XLBookMBS.ErrorMessage property.
Col and Row are zero based.
Please remember that Excel files have limits like 65536 rows and 256 columns.
Some examples using this method:
XLSheetMBS.WriteRichString(row as integer, col as integer, RichString as XLRichStringMBS, format as XLFormatMBS = nil) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XL | MBS XL Plugin | 20.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Add a new rich string with the addRichString() method. If format equals nil then format is ignored.
Returns false if an error occurs. Get error info with XLBookMBS.ErrorMessage property.
XLSheetMBS.WriteString(row as Integer, col as Integer, value as string, format as XLFormatMBS = nil) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XL | MBS XL Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If format is nil then format is ignored.
Returns false if error occurs. Get error info with XLBookMBS.ErrorMessage property.
Col and Row are zero based.
Please remember that Excel files have limits like 65536 rows and 256 columns.
XLSheetMBS.WriteStringAsNumber(row as integer, col as integer, value as string, format as XLFormatMBS = nil) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XL | MBS XL Plugin | 20.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Please pass number as text here to avoid running into rounding errors with floating point numbers.
If format is nil then format is ignored. Use XLBookMBS.datePack() for packing date/time parts to double.
Returns false if error occurs. Get error info with XLBookMBS.ErrorMessage property.
Col and Row are zero based.
Please remember that Excel files have limits like 65536 rows and 256 columns.
XLSheetMBS.WriteStyledText(row as integer, col as integer, StyledText as StyledText, format as XLFormatMBS = nil) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XL | MBS XL Plugin | 20.2 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Same as building a rich string based in the StyledText and assigning it to the cell.
We convert attributes like bold, italic, underline, color, font name and size.
The items on this page are in the following plugins: MBS XL Plugin.