Constructornew XlsxWorksheet(workbook[XlsxWorkbook object], name (optional)[string])DescriptionCreate a new XlsxWorksheet object for writing xlsx files. |
The workbook to create the worksheet in.
The name of the worksheet. If omitted the default names 'Sheet1', 'Sheet2' etc will be used.
ReturnsXlsxWorksheet object Return typeXlsxWorksheet |
ExampleTo create a new worksheet in workbook var worksheet = new XlsxWorksheet(workbook);
|
Details of functionsAddImage(row[integer], column[integer], filename[string], x_scale (optional)[real], y_scale (optional)[real])DescriptionAdd an image to the Xlsx file. Note that the image will not actually be read/inserted until the workbook is written by calling XlsxWorkbook.Close so you must make sure the image file exists until then. |
The row in the xlsx file (rows start at zero)
The column in the xlsx file (columns start at zero)
Name of the image file you want to add to the xlsx file. The image can be in png or jpeg format.
Scale factor for horizontally scaling the input image.
Scale factor for vertically scaling the input image.
ReturnsNo return value |
ExampleTo add image 'C:/temp/test.png' to XlsxWorksheet worksheet on the second row, third column: worksheet.AddImage(1, 2, 'C:/temp/test.png');
|
AddNumber(row[integer], column[integer], value[number])DescriptionAdd number to the Xlsx file |
The row in the xlsx file (rows start at zero)
The column in the xlsx file (columns start at zero)
Number you want to add to the xlsx file
ReturnsNo return value |
ExampleTo add number 1.2345 to XlsxWorksheet worksheet on the second row, third column: worksheet.AddNumber(1, 2, 1.2345);
|
AddText(row[integer], column[integer], text[string])DescriptionAdd text to the Xlsx file |
The row in the xlsx file (rows start at zero)
The column in the xlsx file (columns start at zero)
Text you want to add to the xlsx file
ReturnsNo return value |
ExampleTo add text 'test' to XlsxWorksheet worksheet on the second row, third column: worksheet.AddText(1, 2, 'test');
|
SetColumnProperties(column[integer], width[number])DescriptionSet the column properties in the worksheet |
The column in the xlsx file (columns start at zero)
Width of the column to set
ReturnsNo return value |
ExampleTo set the width of the third column in XlsxWorksheet worksheet to 30: worksheet.SetColumnProperties(2, 30);
|
SetRowProperties(row[integer], height[number])DescriptionSet the row properties in the worksheet |
The row in the xlsx file (rows start at zero)
Height of the row to set
ReturnsNo return value |
ExampleTo set the height of the third row in XlsxWorksheet worksheet to 20: worksheet.SetRowProperties(2, 20);
|