DOCUMENTS 5 - PortalScripting API
|
The XLSXWorksheet class represents the Excel worksheet. More...
Public Member Functions | |
boolean | addAutofilter (number firstRow, number firstCol, number lastRow, number lastCol) |
Add an autofilter area to the current worksheet. More... | |
boolean | freezePanes (number row, number col) |
Split and freeze the current worksheet into panes. More... | |
String | getLastError () |
Function to get the description of the last error that occurred. More... | |
boolean | importFromJSON (String jsonString, number row=0, number col=0) |
Import data from a JSON-String to the current worksheet. More... | |
boolean | importFromJSONFile (String jsonFilePath, number row=0, number col=0) |
Import data from a file containing a JSON-String to the current worksheet. More... | |
boolean | insertChart (number row, number col, XLSXChart chart, number xOffset=0, number yOffset=0, number xScale=1, number yScale=1) |
Insert a chart into the current worksheet. More... | |
boolean | insertImage (number row, number col, String filename, number xOffset=0, number yOffset=0, number xScale=1, number yScale=1) |
Insert an image in a worksheet cell specified by row and column. More... | |
boolean | mergeRange (number firstRow, number firstCol, number lastRow, number lastCol, String value, XLSXFormat format=null) |
Merge a range of cells. More... | |
boolean | setColumn (number firstCol, number lastCol, number width=8.43, XLSXFormat format=null, boolean hidden=false, number level=0, boolean collapsed=false) |
Set the properties for one or more columns of cells. More... | |
boolean | setFirstSheet () |
Set current worksheet as the first visible sheet tab. More... | |
boolean | setFooter (String footer, number margin=0.3) |
Set the printed page footer caption. More... | |
boolean | setGridlines (string option) |
Set the option to display or hide gridlines on the screen and the printed page. More... | |
boolean | setHeader (String header, number margin=0.3) |
Set the printed page header caption. More... | |
boolean | setHorizontalPagebreaks (number[] breaks) |
Set the horizontal page breaks on the current worksheet. More... | |
boolean | setLandscape () |
Set the page orientation as landscape. More... | |
boolean | setMargins (number left=-1, number right=-1, number top=-1, number bottom=-1) |
Set the worksheet margins for the printed page. More... | |
boolean | setPageView () |
Set the page layout to page view mode. More... | |
boolean | setPaperType (number type=0) |
Set the paper format for the printed output of the current worksheet. More... | |
boolean | setPortrait () |
Set the page orientation as portrait. More... | |
boolean | setRow (number row, number height=15, XLSXFormat format=null, boolean hidden=false, number level=0, boolean collapsed=false) |
Set the properties for a row of cells. More... | |
boolean | setTabColor (number color) |
Set the color of the current worksheet tab. More... | |
boolean | setVerticalPagebreaks (number[] breaks) |
Set the vertical page breaks on the current worksheet. More... | |
boolean | setZoom (number scale=100) |
Set the worksheet zoom factor. More... | |
boolean | splitPanes (number vertical, number horizontal) |
Split the current worksheet into panes. More... | |
boolean | writeBlank (number row, number col, XLSXFormat format=null) |
Write a blank cell specified by row and column. More... | |
boolean | writeBoolean (number row, number col, boolean value, XLSXFormat format=null) |
Write an Excel boolean to a worksheet cell specified by row and column . More... | |
boolean | writeCell (String type, number row, number col, var value, XLSXFormat format=null) |
Write a value to a worksheet cell. More... | |
boolean | writeDatetime (number row, number col, Date value, XLSXFormat format=null) |
Write a date or time to a worksheet cell specified by row and column . More... | |
boolean | writeFormula (number row, number col, String value, XLSXFormat format=null) |
Write a formula or function to a worksheet cell specified by row and column . More... | |
boolean | writeLink (number row, number col, String value, XLSXFormat format=null) |
Write a URL/hyperlink to a worksheet cell specified by row and column . More... | |
boolean | writeNumber (number row, number col, number value, XLSXFormat format=null) |
Write a numeric value to a worksheet cell specified by row and column . More... | |
boolean | writeRichString (number row, number col, String value, XLSXFormat format=null) |
Write strings with multiple formats to a worksheet cell specified by row and column . More... | |
boolean | writeString (number row, number col, String value, XLSXFormat format=null) |
Write a string to a worksheet cell specified by row and column . More... | |
The XLSXWorksheet class represents the Excel worksheet.
An XLSXWorksheet object isn't created directly. Instead an XLSXWorksheet is created by calling the XLSXWriter.addWorksheet(String name) function from an XLSXWriter object. It handles operations such as writing data to cells or formatting worksheet layout.
boolean XLSXWorksheet::addAutofilter | ( | number | firstRow, |
number | firstCol, | ||
number | lastRow, | ||
number | lastCol | ||
) |
Add an autofilter area to the current worksheet.
An autofilter is a way of adding drop down lists to the headers of a 2D range of worksheet data. This allows users to filter the data based on simple criteria so that some data is shown and some is hidden.
firstRow | The first row of the range. (All zero indexed.) |
firstCol | The first column of the range. |
lastRow | The last row of the range. |
lastCol | The last column of the range. |
true
if successful, false
in case of any error boolean XLSXWorksheet::freezePanes | ( | number | row, |
number | col | ||
) |
Split and freeze the current worksheet into panes.
This function can be used to divide a worksheet into horizontal or vertical regions known as panes and to "freeze" these panes so that the splitter bars are not visible.
The parameters row
and col
are used to specify the location of the split. It should be noted that the split is specified at the top or left of a cell and that the function uses zero based indexing. Therefore to freeze the first row of a worksheet it is necessary to specify the split at row 2 (which is 1 as the zero-based index).
You can set one of the row
and col
parameters as zero if you do not want either a vertical or horizontal split.
row | The cell row (zero indexed). |
col | The cell column (zero indexed). |
true
if successful, false
in case of any error String XLSXWorksheet::getLastError | ( | ) |
Function to get the description of the last error that occurred.
boolean XLSXWorksheet::importFromJSON | ( | String | jsonString, |
number | row = 0 , |
||
number | col = 0 |
||
) |
Import data from a JSON-String to the current worksheet.
jsonString | Containing the data to be imported. |
row | Optional the zero indexed row number of the first cell of the area the data to be written to. |
col | Optional the zero indexed column number of the first cell of the area the data to be written to. |
true
if successful, false
in case of any error Specification of the JSON-String / object-structure
The JSON-String represents a table and has the following structure:
formats:
array of format-definitions, that can be used for the columns-header and body (how shall a cell look like)table:
contains columns definition and the table-data (body)columns:
array of columns-definitions with specification of column-label and column stylerows:
array of arrays - each array specify one line in the tableFormat-Definition
Column-Definition
boolean XLSXWorksheet::importFromJSONFile | ( | String | jsonFilePath, |
number | row = 0 , |
||
number | col = 0 |
||
) |
Import data from a file containing a JSON-String to the current worksheet.
jsonFilePath | The JSON-file path. |
row | Optional the zero indexed row number of the first cell of the area the data to be written to. |
col | Optional the zero indexed column number of the first cell of the area the data to be written to. |
boolean XLSXWorksheet::insertChart | ( | number | row, |
number | col, | ||
XLSXChart | chart, | ||
number | xOffset = 0 , |
||
number | yOffset = 0 , |
||
number | xScale = 1 , |
||
number | yScale = 1 |
||
) |
Insert a chart into the current worksheet.
This function can be used to insert an XLSXChart object into a worksheet. It takes additional optional parameters to position and scale the image of the chart. The XLSXChart object must be created first using the XLSXWriter.addChart(number type) function and configured using the functions from the class XLSXChart.
row | The zero indexed row number. |
col | The zero indexed column number. |
chart | An XLSXChart object created via XLSXWriter.addChart(number type). |
xOffset | Optional integer offset from the left of the cell in pixels. |
yOffset | Optional integer offset from the top of the cell in pixels. |
xScale | Optional X scale of the image as a decimal. |
yScale | Optional Y scale of the image as a decimal. |
true
if successful, false
in case of any error boolean XLSXWorksheet::insertImage | ( | number | row, |
number | col, | ||
String | filename, | ||
number | xOffset = 0 , |
||
number | yOffset = 0 , |
||
number | xScale = 1 , |
||
number | yScale = 1 |
||
) |
Insert an image in a worksheet cell specified by row and column.
This function can be used to insert an image (in PNG or JPEG format) into a worksheet. It takes additional optional parameters to position and scale the image.
row | The zero indexed row number. |
col | The zero indexed column number. |
filename | The image filename, with path if required. |
xOffset | Optional integer offset from the left of the cell in pixels. |
yOffset | Optional integer offset from the top of the cell in pixels. |
xScale | Optional X scale of the image as a decimal. |
yScale | Optional Y scale of the image as a decimal. |
true
if successful, false
in case of any error XLSXWorksheet.setRow()
if it crosses an inserted image. boolean XLSXWorksheet::mergeRange | ( | number | firstRow, |
number | firstCol, | ||
number | lastRow, | ||
number | lastCol, | ||
String | value, | ||
XLSXFormat | format = null |
||
) |
Merge a range of cells.
This function allows cells to be merged together so that they act as a single area. Excel generally merges and centers cells at same time. To get similar behavior you need to apply a format object with the appropriate alignment:
firstRow | The first row of the range. (All zero indexed.) |
firstCol | The first column of the range. |
lastRow | The last row of the range. |
lastCol | The last col of the range. |
value | String value to write to the merged range. |
format | Optional XLSXFormat object used to apply formatting to the merged cells. The default value is null to indicate no formatting. |
true
if successful, false
in case of any error boolean XLSXWorksheet::setColumn | ( | number | firstCol, |
number | lastCol, | ||
number | width = 8.43 , |
||
XLSXFormat | format = null , |
||
boolean | hidden = false , |
||
number | level = 0 , |
||
boolean | collapsed = false |
||
) |
Set the properties for one or more columns of cells.
This function can be used to change the default properties of a single column or a range of columns.
If it is applied to a single column the value of firstCol
and lastCol
should be the same. It can also be used to create Outlines and Grouping of columns with the optional parameters hidden
, level
and collapsed
. Adjacent columns with the same outline level are grouped together into a single outline. Columns can be collapsed by setting the parameter hidden
for the hidden columns and setting the parameter collapsed
for a column that has the collapsed '+' symbol.
firstCol | The zero indexed first column. |
lastCol | The zero indexed last column. |
width | Optional width of the column(s). The default column width is 8.43 . The width parameter sets the column width in the same units used by Excel which is: the number of characters in the default font. The default width is 8.43 in the default font of Calibri 11. The actual relationship between a string width and a column width in Excel is complex. See the following explanation of column widths from the Microsoft support documentation for more details. Note: There is no way to specify "AutoFit" for a column in the Excel file format. This feature is only available at runtime from within Excel. It is possible to simulate "AutoFit" in your application by tracking the maximum width of the data in the column as your write it and then adjusting the column width at the end. |
format | Optional XLSXFormat object used to apply formatting to any cells in the column that don't have a format. As in Excel a row format takes precedence over a default column format. |
hidden | Optional flag used to hide the column(s). |
level | Optional integer outline level of the column(s) used to create Outlines and Grouping. Excel allows up to 7 outline levels. Therefore the level parameter should be in the range 0 <= level <= 7 . |
collapsed | Optional flag used to create Outlines and Grouping and indicating whether to collapse a column that has the collapsed '+' symbol. |
true
if successful, false
in case of any error boolean XLSXWorksheet::setFirstSheet | ( | ) |
Set current worksheet as the first visible sheet tab.
The XLSXWriter.activateWorksheet(var worksheet) function determines which worksheet is initially selected. However, if there are a large number of worksheets the selected worksheet may not appear on the screen. To avoid this you can select the leftmost visible worksheet tab using this function. The default value is the first worksheet.
true
if successful, false
in case of any error boolean XLSXWorksheet::setFooter | ( | String | footer, |
number | margin = 0.3 |
||
) |
Set the printed page footer caption.
Footers are generated using a string which is a combination of plain text and control characters (see Generating header/footer for more details).
footer | The footer string. |
margin | Optional footer margin in inches. Excel default is 0.3. |
true
if successful, false
in case of any error boolean XLSXWorksheet::setGridlines | ( | string | option | ) |
Set the option to display or hide gridlines on the screen and the printed page.
There are two options
hideAll
: Hide gridlines on the screen and the printed page. showPrint
: Display gridlines on the screen and the printed page. option | string Gridline option. Possible values are hideAll and showPrint . See description for details. |
true
if successful, false
in case of any error boolean XLSXWorksheet::setHeader | ( | String | header, |
number | margin = 0.3 |
||
) |
Set the printed page header caption.
Headers are generated using a string which is a combination of plain text and control characters (see Generating header/footer for more details).
header | The header string. |
margin | Optional header margin in inches. Excel default is 0.3. |
true
if successful, false
in case of any errorboolean XLSXWorksheet::setHorizontalPagebreaks | ( | number [] | breaks | ) |
Set the horizontal page breaks on the current worksheet.
This function adds horizontal page breaks to the worksheet. A page break causes all the data that follows it to be printed on the next page. Horizontal page breaks act between rows.
breaks | Integer array of page breaks. |
true
if successful, false
in case of any error boolean XLSXWorksheet::setLandscape | ( | ) |
Set the page orientation as landscape.
This function is used to set the orientation of the worksheet's printed page to landscape.
true
if successful, false
in case of any error boolean XLSXWorksheet::setMargins | ( | number | left = -1 , |
number | right = -1 , |
||
number | top = -1 , |
||
number | bottom = -1 |
||
) |
Set the worksheet margins for the printed page.
This function is used to set the margins of the worksheet when it is printed. The units are in inches. Specifying -1 for any parameter will give the default Excel value as shown below.
left | Optional left margin in inches. Excel default is 0.7. |
right | Optional right margin in inches. Excel default is 0.7. |
top | Optional top margin in inches. Excel default is 0.75. |
bottom | Optional bottom margin in inches. Excel default is 0.75. |
true
if successful, false
in case of any error boolean XLSXWorksheet::setPageView | ( | ) |
Set the page layout to page view mode.
This function is used to display the worksheet in "Page View/Layout" mode.
true
if successful, false
in case of any error boolean XLSXWorksheet::setPaperType | ( | number | type = 0 | ) |
Set the paper format for the printed output of the current worksheet.
The following paper styles are available:
Index | Paper format | Paper size :-— |
---|---|---|
0 | Printer default | Printer default |
1 | Letter | 8 1/2 x 11 in |
2 | Letter Small | 8 1/2 x 11 in |
3 | Tabloid | 11 x 17 in |
4 | Ledger | 17 x 11 in |
5 | Legal | 8 1/2 x 14 in |
6 | Statement | 5 1/2 x 8 1/2 in |
7 | Executive | 7 1/4 x 10 1/2 in |
8 | A3 | 297 x 420 mm |
9 | A4 | 210 x 297 mm |
10 | A4 Small | 210 x 297 mm |
11 | A5 | 148 x 210 mm |
12 | B4 | 250 x 354 mm |
13 | B5 | 182 x 257 mm |
14 | Folio | 8 1/2 x 13 in |
15 | Quarto | 215 x 275 mm |
16 | — | 10x14 in |
17 | — | 11x17 in |
18 | Note | 8 1/2 x 11 in |
19 | Envelope 9 | 3 7/8 x 8 7/8 |
20 | Envelope 10 | 4 1/8 x 9 1/2 |
21 | Envelope 11 | 4 1/2 x 10 3/8 |
22 | Envelope 12 | 4 3/4 x 11 |
23 | Envelope 14 | 5 x 11 1/2 |
24 | C size sheet | — |
25 | D size sheet | — |
26 | E size sheet | — |
27 | Envelope DL | 110 x 220 mm |
28 | Envelope C3 | 324 x 458 mm |
29 | Envelope C4 | 229 x 324 mm |
30 | Envelope C5 | 162 x 229 mm |
31 | Envelope C6 | 114 x 162 mm |
32 | Envelope C65 | 114 x 229 mm |
33 | Envelope B4 | 250 x 353 mm |
34 | Envelope B5 | 176 x 250 mm |
35 | Envelope B6 | 176 x 125 mm |
36 | Envelope | 110 x 230 mm |
37 | Monarch | 3.875 x 7.5 in |
38 | Envelope | 3 5/8 x 6 1/2 in |
39 | Fanfold | 14 7/8 x 11 in |
40 | German Std Fanfold | 8 1/2 x 12 in |
41 | German Legal Fanfold | 8 1/2 x 13 in |
Note: It is likely that not all of these paper types will be available to the end user since it will depend on the paper formats that the user's printer supports. Therefore, it is best to stick to standard paper types. If you do not specify a paper type the worksheet will print using the printer's default paper style.
type | Optional integer paper format type (see table of paper styles). |
true
if successful, false
in case of any error boolean XLSXWorksheet::setPortrait | ( | ) |
Set the page orientation as portrait.
This function is used to set the orientation of the worksheet's printed page to portrait. The default worksheet orientation is portrait, so this function isn't generally required.
true
if successful, false
in case of any error boolean XLSXWorksheet::setRow | ( | number | row, |
number | height = 15 , |
||
XLSXFormat | format = null , |
||
boolean | hidden = false , |
||
number | level = 0 , |
||
boolean | collapsed = false |
||
) |
Set the properties for a row of cells.
The function is used to change the default properties of a row. The most common use for this function is to change the height of a row. It can also be used to create Outlines and Grouping of rows with the optional parameters hidden
, level
and collapsed
. Adjacent rows with the same outline level are grouped together into a single outline. Rows can be collapsed by setting the parameter hidden
for the hidden rows and setting the parameter collapsed
for a row that has the collapsed '+' symbol.
row | The zero indexed row number. |
height | Optional row height. The default row height is 15. |
format | Optional XLSXFormat object used to apply formatting to any cells in the row that don't have a format. As with Excel the row format is overridden by an explicit cell format. |
hidden | Optional flag used to hide the row. |
level | Optional integer outline level of the row used to create Outlines and Grouping. Excel allows up to 7 outline levels. Therefore the level parameter should be in the range 0 <= level <= 7 . |
collapsed | Optional flag used to create Outlines and Grouping and indicating whether to collapse a row that has the collapsed '+' symbol. |
true
if successful, false
in case of any error boolean XLSXWorksheet::setTabColor | ( | number | color | ) |
Set the color of the current worksheet tab.
color | The desired tab color specified using a HTML style RGB integer value. |
true
if successful, false
in case of any error boolean XLSXWorksheet::setVerticalPagebreaks | ( | number [] | breaks | ) |
Set the vertical page breaks on the current worksheet.
This function adds vertical page breaks to the worksheet. A page break causes all the data that follows it to be printed on the next page. Vertical page breaks act between columns.
breaks | Integer array of page breaks. |
true
if successful, false
in case of any error boolean XLSXWorksheet::setZoom | ( | number | scale = 100 | ) |
Set the worksheet zoom factor.
scale | Optional integer worksheet zoom factor in the range 10 <= zoom <= 400 . The default zoom factor is 100. |
true
if successful, false
in case of any error boolean XLSXWorksheet::splitPanes | ( | number | vertical, |
number | horizontal | ||
) |
Split the current worksheet into panes.
This function can be used to divide a worksheet into horizontal or vertical regions known as panes. This function is different from the function XLSXWorksheet.freezePanes(number row, number col) in that the splits between the panes will be visible to the user and each pane will have its own scroll bars.
The parameters vertical
and horizontal
are used to specify the vertical and horizontal position of the split. The units for vertical
and horizontal
are the same as those used by Excel to specify row height and column width. However, the vertical and horizontal units are different from each other. Therefore you must specify the vertical
and horizontal
parameters in terms of the row heights and column widths that you have set or the default values which are 15 for a row and 8.43 for a column.
vertical | The position for the vertical split. |
horizontal | The position for the horizontal split. |
true
if successful, false
in case of any error boolean XLSXWorksheet::writeBlank | ( | number | row, |
number | col, | ||
XLSXFormat | format = null |
||
) |
Write a blank cell specified by row and column.
This function is used to add formatting to a cell which doesn't contain a string or number value.
Excel differentiates between an "Empty" cell and a "Blank" cell. An Empty cell is a cell which doesn't contain data or formatting whilst a Blank cell doesn't contain data but does contain formatting. Excel stores Blank cells but ignores Empty cells.
As such, if you write an empty cell without formatting it is ignored.
row | The zero indexed row number. |
col | The zero indexed column number. |
format | Optional XLSXFormat object used to apply formatting to the cell. The default value is null to indicate no formatting. |
true
if successful, false
in case of any error boolean XLSXWorksheet::writeBoolean | ( | number | row, |
number | col, | ||
boolean | value, | ||
XLSXFormat | format = null |
||
) |
Write an Excel boolean to a worksheet cell specified by row
and column
.
This function is an alternative to using XLSXWorksheet.writeCell(String type, number row, number col, var value, XLSXFormat format) with type = "boolean"
.
row | The zero indexed row number. |
col | The zero indexed column number. |
value | The boolean value to write to the cell. |
format | Optional XLSXFormat object used to apply formatting to the cell. The default value is null to indicate no formatting. |
true
if successful, false
in case of any error boolean XLSXWorksheet::writeCell | ( | String | type, |
number | row, | ||
number | col, | ||
var | value, | ||
XLSXFormat | format = null |
||
) |
Write a value to a worksheet cell.
This function writes a value according to the type (see below) to a worksheet cell specified by row
and column
.
type | The type (see below) of the value to write to the cell. |
row | The zero indexed row number. |
col | The zero indexed column number. |
value | The value to write to the cell can be specified as follows:
|
format | Optional XLSXFormat object used to apply formatting to the cell. The default value is null to indicate no formatting. |
true
if successful, false
in case of any error Available value types:
string
number
NaN
, Inf
or -Inf
as a number value. If you are writing data that contains these values then your application should convert them to a string or handle them in some other way. boolean
formula
"=SUM(1, 2, 3)"
. link
A value of this type is a string containing a URL/hyperlink. The usual web style URI's are supported: http://
, https://
, ftp://
and mailto:
. An Excel hyperlink is comprised of two elements: the displayed string and the non-displayed link. By default the displayed string is the same as the link. However, it is possible to overwrite it with any other value type. The most common case is to overwrite the displayed link text with another string:
Two local URIs are supported:
and internal:
. These are used for hyperlinks to internal worksheet references or external Excel file and worksheet references.external:
Worksheet references are typically of the form Worksheet1!A1
. You can also link to a worksheet range using the standard Excel notation: Worksheet1!A1:B2
.
In external links the Excel file and worksheet name must be separated by the #
character:
Excel requires that worksheet names containing spaces or non alphanumeric characters are single quoted as follows:
Links to network files are also supported. Network files normally begin with two back slashes as follows \\NETWORK\etc
.
Note: This function will escape the following characters in URLs as required by Excel: \s " < > \ [ ] ^ { }
unless the URL already contains %xx
style escapes. In which case it is assumed that the URL was escaped correctly by the user and will by passed directly to Excel.
datetime
"Feb 28 2013 12:00 PM"
is stored as the number 41333.5
. The integer part of the number stores the number of days since the epoch, which is generally 1900, and the fractional part stores the percentage of the day. A date or time in Excel is just like any other number. To display the number as a date you must apply an Excel number format to it. richString
format
and string
. Each object represents a fragment of the rich multi-format string with an XLSXFormat (specified with the format name or null
) to define the format for the string part. If the string fragment is unformatted then null can be used for the format.boolean XLSXWorksheet::writeDatetime | ( | number | row, |
number | col, | ||
Date | value, | ||
XLSXFormat | format = null |
||
) |
Write a date or time to a worksheet cell specified by row
and column
.
This function is an alternative to using XLSXWorksheet.writeCell(String type, number row, number col, var value, XLSXFormat format) with type = "datetime"
.
row | The zero indexed row number. |
col | The zero indexed column number. |
value | The datetime to write to the cell. See the value type datetime in the documentation of XLSXWorksheet.writeCell() for more details. |
format | Optional XLSXFormat object used to apply formatting to the cell. The default value is null to indicate no formatting. |
true
if successful, false
in case of any error boolean XLSXWorksheet::writeFormula | ( | number | row, |
number | col, | ||
String | value, | ||
XLSXFormat | format = null |
||
) |
Write a formula or function to a worksheet cell specified by row
and column
.
This function is an alternative to using XLSXWorksheet.writeCell(String type, number row, number col, var value, XLSXFormat format) with type = "formula"
.
row | The zero indexed row number. |
col | The zero indexed column number. |
value | Formula string to write to cell. See the value type formula in the documentation of XLSXWorksheet.writeCell() for more details. |
format | Optional XLSXFormat object used to apply formatting to the cell. The default value is null to indicate no formatting. |
true
if successful, false
in case of any error boolean XLSXWorksheet::writeLink | ( | number | row, |
number | col, | ||
String | value, | ||
XLSXFormat | format = null |
||
) |
Write a URL/hyperlink to a worksheet cell specified by row
and column
.
This function is an alternative to using XLSXWorksheet.writeCell(String type, number row, number col, var value, XLSXFormat format) with type = "link"
.
row | The zero indexed row number. |
col | The zero indexed column number. |
value | The URL/hyperlink to write to the cell. See the value type link in the documentation of XLSXWorksheet.writeCell() for more details. |
format | Optional XLSXFormat object used to apply formatting to the cell. The default value is null to indicate no formatting. |
true
if successful, false
in case of any error boolean XLSXWorksheet::writeNumber | ( | number | row, |
number | col, | ||
number | value, | ||
XLSXFormat | format = null |
||
) |
Write a numeric value to a worksheet cell specified by row
and column
.
This function is an alternative to using XLSXWorksheet.writeCell(String type, number row, number col, var value, XLSXFormat format) with type = "number"
.
row | The zero indexed row number. |
col | The zero indexed column number. |
value | The number to write to the cell. See the value type number in the documentation of XLSXWorksheet.writeCell() for more details. |
format | Optional XLSXFormat object used to apply formatting to the cell. The default value is null to indicate no formatting. |
true
if successful, false
in case of any error boolean XLSXWorksheet::writeRichString | ( | number | row, |
number | col, | ||
String | value, | ||
XLSXFormat | format = null |
||
) |
Write strings with multiple formats to a worksheet cell specified by row
and column
.
This function is an alternative to using XLSXWorksheet.writeCell(String type, number row, number col, var value, XLSXFormat format) with type = "richString"
.
row | The zero indexed row number. |
col | The zero indexed column number. |
value | A JSON-String containing an array of objects with the property pair format and string . See the value type richString in the documentation of XLSXWorksheet.writeCell() for more details. |
format | Optional XLSXFormat object used to apply formatting to the cell. The default value is null to indicate no formatting. |
true
if successful, false
in case of any error boolean XLSXWorksheet::writeString | ( | number | row, |
number | col, | ||
String | value, | ||
XLSXFormat | format = null |
||
) |
Write a string to a worksheet cell specified by row
and column
.
This function is an alternative to using XLSXWorksheet.writeCell(String type, number row, number col, var value, XLSXFormat format) with type = "string"
.
row | The zero indexed row number. |
col | The zero indexed column number. |
value | String to write to cell. See the value type string in the documentation of XLSXWorksheet.writeCell() for more details. |
format | Optional XLSXFormat object used to apply formatting to the cell. The default value is null to indicate no formatting. |
true
if successful, false
in case of any error