XLS
Create and read Excel files, support for XLS files as XLSX files.
This feature uses the Apache POI library.
const excel = _xls.create();
const titles = _val.init()
.add(
_val.init()
.set('value', 'Name')
).add(
_val.init()
.set('value', 'Age')
);
const endPosition = excel.addDataTable(1, 1, titles)
const data = _val.init()
.add(
_val.init()
.add(
_val.init()
.set('value', 'John')
).add(
_val.init()
.set('value', 24)
)
).add(
_val.init()
.add(
_val.init()
.set('value', 'Annye')
).add(
_val.init()
.set('value', 22)
)
);
endPosition = excel.addDataTable(endPosition.row, 1, data)
excel.output("ages.xls");
activeSheet
_xls.create().activeSheet(index: int) : XLS
Description
Sets the spreadsheet that is active.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| index | int | Spreadsheet number. |
Return
( XLS )
A instância atual do recurso XLS.
_xls.create().activeSheet(sheet: org.apache.poi.ss.usermodel.Sheet) : XLS
Description
Sets the spreadsheet that is active.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| sheet | org.apache.poi.ss.usermodel.Sheet | Spreadsheet reference object. |
Return
( XLS )
The current instance of the XLS resource.
addDataTable
_xls.create().addDataTable(rowIndex: int, colIndex: int, data: java.util.List) : XLSPosition
Description
Adds a data table to the spreadsheet.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| rowIndex | int | Line number. |
| colIndex | int | Column number. |
| data | java.util.List | List of data to be inserted. |
Return
( XLSPosition )
Reference of the position of the last cell with data entered.
_xls.create().addDataTable(rowIndex: int, colIndex: int, data: java.util.List, vertical: boolean) : XLSPosition
Description
Adds a data table to the spreadsheet.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| rowIndex | int | Line number. |
| colIndex | int | Column number. |
| data | java.util.List | List of data to be inserted. |
| vertical | boolean | Insert data vertically. |
Return
( XLSPosition )
Reference of the position of the last cell with data entered.
_xls.create().addDataTable(rowIndex: int, colIndex: int, data: Values) : XLSPosition
Description
Adds a data table to the spreadsheet.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| rowIndex | int | Line number. |
| colIndex | int | Column number. |
| data | Values | List of data to be inserted. |
Return
( XLSPosition )
Reference of the position of the last cell with data entered.
_xls.create().addDataTable(rowIndex: int, colIndex: int, data: Values, vertical: boolean) : XLSPosition
Description
Adds a data table to the spreadsheet.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| rowIndex | int | Line number. |
| colIndex | int | Column number. |
| data | Values | List of data to be inserted. |
| vertical | boolean | Insert data vertically. |
Return
( XLSPosition )
Reference of the position of the last cell with data entered.
_xls.create().addDataTable(config: Values | DataSchema | java.util.Map, data: java.util.List) : XLSPosition
Description
Adds a data table to the spreadsheet.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| config | _Values | DataSchema | java.util.Map_ |
| data | java.util.List | List of data to be inserted. |
Return
( XLSPosition )
Reference of the position of the last cell with data entered.
_xls.create().addDataTable(sheet: org.apache.poi.ss.usermodel.Sheet, rowIndex: int, colIndex: int, data: java.util.List) : XLSPosition
Description
Adds a data table to the spreadsheet.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| sheet | org.apache.poi.ss.usermodel.Sheet | Spreadsheet object. |
| rowIndex | int | Line number. |
| colIndex | int | Column number. |
| data | java.util.List | List of data to be inserted. |
Return
( XLSPosition )
Reference of the position of the last cell with data entered.
_xls.addDataTable(sheet: org.apache.poi.ss.usermodel.Sheet, rowIndex: int, colIndex: int, data: java.util.List, vertical: boolean) : XLSPosition
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| sheet | org.apache.poi.ss.usermodel.Sheet | |
| rowIndex | int | |
| colIndex | int | |
| data | java.util.List | |
| vertical | boolean |
Return
( XLSPosition )
_xls.create().addDataTable(sheet: org.apache.poi.ss.usermodel.Sheet, rowIndex: int, colIndex: int, data: Values) : XLSPosition
Description
Adds a data table to the spreadsheet.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| sheet | org.apache.poi.ss.usermodel.Sheet | Spreadsheet object. |
| rowIndex | int | Line number. |
| colIndex | int | Column number. |
| data | Values | List of data to be inserted. |
Return
( XLSPosition )
Reference of the position of the last cell with data entered.
_xls.addDataTable(sheet: org.apache.poi.ss.usermodel.Sheet, rowIndex: int, colIndex: int, data: Values, vertical: boolean) : XLSPosition
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| sheet | org.apache.poi.ss.usermodel.Sheet | |
| rowIndex | int | |
| colIndex | int | |
| data | Values | |
| vertical | boolean |
Return
( XLSPosition )
anchorType
_xls.anchorType(type: string) : org.apache.poi.ss.usermodel.ClientAnchor$AnchorType
Description
Generates the type of anchor.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| type | string | Anchor type name, supports:
|
Return
( org.apache.poi.ss.usermodel.ClientAnchor$AnchorType )
The anchor type configured with the defined type.
borderStyle
_xls.borderStyle(type: string) : org.apache.poi.ss.usermodel.BorderStyle
Description
Generates the outline style of the cell borders.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| type | string | Name of the border style type, supports:
|
Return
( org.apache.poi.ss.usermodel.BorderStyle )
The border outline style configured with the defined type.
cell
_xls.create().cell(rowIndex: int, colIndex: int) : org.apache.poi.ss.usermodel.Cell
Description
Gets a spreadsheet cell and if it does not exist then it will be created.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| rowIndex | int | Line number. |
| colIndex | int | Column number. |
Return
( org.apache.poi.ss.usermodel.Cell )
Cell representation object.
_xls.create().cell(sheet: org.apache.poi.ss.usermodel.Sheet, rowIndex: int, colIndex: int) : org.apache.poi.ss.usermodel.Cell
Description
Gets a spreadsheet cell and if it does not exist then it will be created.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| sheet | org.apache.poi.ss.usermodel.Sheet | Spreadsheet object. |
| rowIndex | int | Line number of the sheet. |
| colIndex | int | Column number. |
Return
( org.apache.poi.ss.usermodel.Cell )
Cell representation object.
cellRangeAddress
_xls.cellRangeAddress(firstRow: int, lastRow: int, firstCol: int, lastCol: int) : org.apache.poi.ss.util.CellRangeAddress
Description
Generates the region address of the cell area.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| firstRow | int | First line number. |
| lastRow | int | Last line number. |
| firstCol | int | First column number. |
| lastCol | int | Last column number. |
Return
( org.apache.poi.ss.util.CellRangeAddress )
The cell area address reference.
cellStyle
_xls.cellStyle() : org.apache.poi.ss.usermodel.CellStyle
Description
Creates a new cell style in the workbook.
Return
( org.apache.poi.ss.usermodel.CellStyle )
The new cell style created.
cellStyleFormat
_xls.cellStyleFormat(format: string) : org.apache.poi.ss.usermodel.CellStyle
Description
Creates a new cell style with an associated format in the workbook.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| format | string | Format standard definition. |
Return
( org.apache.poi.ss.usermodel.CellStyle )
The new cell style created with the configured format.
color
_xls.color(color: string) : java.lang.Object
Description
Generates the color code based on predefined names.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| color | string | Color name, supports:
|
Return
( java.lang.Object )
The color reference.
columnReference
_xls.columnReference(index: int) : string
Description
Gets the column reference (letters) based on its numeric position.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| index | int | Column number. |
Return
( string )
Reference in column letters.
_xls.columnReference(index: string) : int
Description
Gets the numeric position of the column based on the letter reference.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| index | string | Reference in column letters. |
Return
( int )
Numeric position of the column.
create
_xls.create() : XLS
Description
Creates a new Excel document.
How To Use
const excel = _xls.create();
Return
( XLS )
New XLS resource instance.
create2007
_xls.create2007() : XLS
Description
Creates a new Excel 97-2007 document, in the old format.
How To Use
const excel = _xls.create2007();
Return
( XLS )
New XLS resource instance.
createSheet
_xls.create().createSheet() : org.apache.poi.ss.usermodel.Sheet
Description
Creates a new spreadsheet.
Return
( org.apache.poi.ss.usermodel.Sheet )
Spreadsheet created.
_xls.create().createSheet(name: string) : org.apache.poi.ss.usermodel.Sheet
Description
Create a new spreadsheet and define its name.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| name | string | Spreadsheet name. |
Return
( org.apache.poi.ss.usermodel.Sheet )
Spreadsheet created.
fillPattern
_xls.fillPattern(type: string) : org.apache.poi.ss.usermodel.FillPatternType
Description
Generates the background fill pattern.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| type | string | Fill pattern type, supports:
|
Return
( org.apache.poi.ss.usermodel.FillPatternType )
The fill pattern configured with the defined type.
font
_xls.font() : org.apache.poi.ss.usermodel.Font
Description
Creates a new font style in the workbook.
Return
( org.apache.poi.ss.usermodel.Font )
The new font style created.
format
_xls.format(format: string) : short
Description
Creates a new cell format in the workbook.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| format | string | Format standard definition. |
Return
( short )
Identifier code for the new format.
getAllSheets
_xls.create().getAllSheets() : java.util.List
Description
List of all spreadsheets.
Return
( java.util.List )
All existing spreadsheets in the document.
getCellData
_xls.create().getCellData(rowIndex: int, colIndex: int) : Values
Description
Gets an object with data from a spreadsheet cell.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| rowIndex | int | Line number. |
| colIndex | int | Column number. |
Return
( Values )
Cell data information.
_xls.create().getCellData(cell: org.apache.poi.ss.usermodel.Cell) : Values
Description
Gets an object with data from a spreadsheet cell.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| cell | org.apache.poi.ss.usermodel.Cell | Object that represents the cell. |
Return
( Values )
Cell data information.
_xls.create().getCellData(sheet: org.apache.poi.ss.usermodel.Sheet, rowIndex: int, colIndex: int) : Values
Description
Gets an object with data from a spreadsheet cell.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| sheet | org.apache.poi.ss.usermodel.Sheet | Spreadsheet object. |
| rowIndex | int | Line number of the sheet. |
| colIndex | int | Column number. |
Return
( Values )
Cell data information.
getNumberOfSheets
_xls.create().getNumberOfSheets() : int
Description
Gets the total number of spreadsheets.
Return
( int )
The total number of spreadsheets in the document.
getSheet
_xls.create().getSheet(index: int) : org.apache.poi.ss.usermodel.Sheet
Description
Get the spreadsheet by number (index).
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| index | int | Spreadsheet number. |
Return
( org.apache.poi.ss.usermodel.Sheet )
Spreadsheet referring to the number (index).
_xls.create().getSheet(name: string) : org.apache.poi.ss.usermodel.Sheet
Description
Gets the spreadsheet by name.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| name | string | Spreadsheet name. |
Return
( org.apache.poi.ss.usermodel.Sheet )
Spreadsheet for the name.
horizontalAlignment
_xls.horizontalAlignment(type: string) : org.apache.poi.ss.usermodel.HorizontalAlignment
Description
Generates horizontal alignment.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| type | string | Horizontal alignment type name, supports:
|
Return
( org.apache.poi.ss.usermodel.HorizontalAlignment )
The horizontal alignment configured with the defined type.
insertPicture
_xls.insertPicture(sheet: org.apache.poi.ss.usermodel.Sheet, file: File, anchor: org.apache.poi.ss.usermodel.ClientAnchor) : org.apache.poi.ss.usermodel.Picture
Description
Inserts an image associated with the anchor in a specific spreadsheet.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| sheet | org.apache.poi.ss.usermodel.Sheet | Spreadsheet that will be used to insert the image. |
| file | File | Image file. |
| anchor | org.apache.poi.ss.usermodel.ClientAnchor | Anchor to associate the image. |
Return
( org.apache.poi.ss.usermodel.Picture )
The reference object of the inserted image.
_xls.insertPicture(sheet: org.apache.poi.ss.usermodel.Sheet, storage: Storage, anchor: org.apache.poi.ss.usermodel.ClientAnchor) : org.apache.poi.ss.usermodel.Picture
Description
Inserts an image associated with the anchor in a specific spreadsheet.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| sheet | org.apache.poi.ss.usermodel.Sheet | Spreadsheet that will be used to insert the image. |
| storage | Storage | Storage reference associated with an image file. |
| anchor | org.apache.poi.ss.usermodel.ClientAnchor | Anchor to associate the image. |
Return
( org.apache.poi.ss.usermodel.Picture )
The reference object of the inserted image.
_xls.create().insertPicture(file: File, linha: int, coluna: int) : org.apache.poi.ss.usermodel.Picture
Description
Insert the image into the specified cell.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| file | File | Image file. |
| linha | int | Line number. |
| coluna | int | Column number. |
Return
( org.apache.poi.ss.usermodel.Picture )
The reference object of the inserted image.
_xls.create().insertPicture(file: File, anchor: org.apache.poi.ss.usermodel.ClientAnchor) : org.apache.poi.ss.usermodel.Picture
Description
Inserts an image associated with the anchor.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| file | File | Image file. |
| anchor | org.apache.poi.ss.usermodel.ClientAnchor | Anchor to associate the image. |
Return
( org.apache.poi.ss.usermodel.Picture )
The reference object of the inserted image.
_xls.create().insertPicture(storage: Storage, linha: int, coluna: int) : org.apache.poi.ss.usermodel.Picture
Description
Insert the image into the specified cell.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| storage | Storage | Storage reference associated with an image file. |
| linha | int | Line number. |
| coluna | int | Column number. |
Return
( org.apache.poi.ss.usermodel.Picture )
The reference object of the inserted image.
_xls.create().insertPicture(storage: Storage, anchor: org.apache.poi.ss.usermodel.ClientAnchor) : org.apache.poi.ss.usermodel.Picture
Description
Inserts an image associated with the anchor.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| storage | Storage | Storage reference associated with an image file. |
| anchor | org.apache.poi.ss.usermodel.ClientAnchor | Anchor to associate the image. |
Return
( org.apache.poi.ss.usermodel.Picture )
The reference object of the inserted image.
mergedRegion
_xls.mergedRegion(firstRow: int, lastRow: int, firstCol: int, lastCol: int) : int
Description
Performs the merging of cells in the region.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| firstRow | int | First line number. |
| lastRow | int | Last line number. |
| firstCol | int | First column number. |
| lastCol | int | Last column number. |
Return
( int )
The reference of the merged cell region.
_xls.mergedRegion(sheet: org.apache.poi.ss.usermodel.Sheet, firstRow: int, lastRow: int, firstCol: int, lastCol: int) : int
Description
Performs the merging of cells in the passed region in a specific worksheet.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| sheet | org.apache.poi.ss.usermodel.Sheet | Spreadsheet that will be merged the cells. |
| firstRow | int | First line number. |
| lastRow | int | Last line number. |
| firstCol | int | First column number. |
| lastCol | int | Last column number. |
Return
( int )
The reference of the merged cell region.
open
_xls.open(input: InputStream) : XLS
Description
Opens an Excel file.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | InputStream | File data input stream object. |
Return
( XLS )
File opened in a new instance of the XLS resource.
_xls.open(input: InputStream, password: string) : XLS
Description
Opens an Excel file.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | InputStream | File data input stream object. |
| password | string | File password. |
Return
( XLS )
File opened in a new instance of the XLS resource.
_xls.open(file: File) : XLS
Description
Opens an Excel file.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| file | File | Excel document type file. |
Return
( XLS )
File opened in a new instance of the XLS resource.
_xls.open(file: File, password: string) : XLS
Description
Opens an Excel file.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| file | File | Excel document type file. |
| password | string | File password. |
Return
( XLS )
File opened in a new instance of the XLS resource.
_xls.open(input: InputStream) : XLS
Description
Opens an Excel file.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | InputStream | File data input stream object. |
Return
( XLS )
File opened in a new instance of the XLS resource.
_xls.open(input: InputStream, password: string) : XLS
Description
Opens an Excel file.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | InputStream | File data input stream object. |
| password | string | File password. |
Return
( XLS )
File opened in a new instance of the XLS resource.
_xls.open(storage: Storage) : XLS
Description
Opens an Excel file.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| storage | Storage | Storage reference where the file will be opened. |
Return
( XLS )
File opened in a new instance of the XLS resource.
_xls.open(storage: Storage, password: string) : XLS
Description
Opens an Excel file.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| storage | Storage | Storage reference where the file will be opened. |
| password | string | File password. |
Return
( XLS )
File opened in a new instance of the XLS resource.
output
_xls.create().output(fileName: string) : void
Description
Performs the sending of data from the final file to the client to download it.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| fileName | string | Name of the file. |
Return
( void )
position
_xls.position(rowIndex: int, colIndex: int) : XLSPosition
Description
Gets the positioning object.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| rowIndex | int | Line number. |
| colIndex | int | Column number. |
Return
( XLSPosition )
Position reference based on passed coordinates.
read
_xls.read(input: InputStream) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | InputStream | Excel file reference. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: InputStream, hiddenSheets: boolean) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | InputStream | Excel file reference. |
| hiddenSheets | boolean | It also processes hidden spreadsheets. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: InputStream, sheetNumber: int) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | InputStream | Excel file reference. |
| sheetNumber | int | Spreadsheet number. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: InputStream, hiddenSheets: string) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | InputStream | Excel file reference. |
| hiddenSheets | string | It also processes hidden spreadsheets. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: InputStream, sheetNumber: string, hiddenSheets: boolean) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | InputStream | Excel file reference. |
| sheetNumber | string | Spreadsheet number. |
| hiddenSheets | boolean | It also processes hidden spreadsheets. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: InputStream, sheetNumber: string, hiddenSheets: int) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | InputStream | Excel file reference. |
| sheetNumber | string | Spreadsheet number. |
| hiddenSheets | int | It also processes hidden spreadsheets. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(in: InputStream, password: string, sheetNumber: int, hiddenSheets: boolean) : Values
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| in | InputStream | |
| password | string | |
| sheetNumber | int | |
| hiddenSheets | boolean |
Return
( Values )
_xls.read(input: File) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | File | Excel file reference. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: File, hiddenSheets: boolean) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | File | Excel file reference. |
| hiddenSheets | boolean | It also processes hidden spreadsheets. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: File, sheetNumber: int) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | File | Excel file reference. |
| sheetNumber | int | Spreadsheet number. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: File, sheetNumber: int, hiddenSheets: boolean) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | File | Excel file reference. |
| sheetNumber | int | Spreadsheet number. |
| hiddenSheets | boolean | It also processes hidden spreadsheets. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: File, hiddenSheets: string) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | File | Excel file reference. |
| hiddenSheets | string | It also processes hidden spreadsheets. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: File, sheetNumber: string, hiddenSheets: boolean) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | File | Excel file reference. |
| sheetNumber | string | Spreadsheet number. |
| hiddenSheets | boolean | It also processes hidden spreadsheets. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: File, sheetNumber: string, hiddenSheets: int) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | File | Excel file reference. |
| sheetNumber | string | Spreadsheet number. |
| hiddenSheets | int | It also processes hidden spreadsheets. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(file: File, password: string, sheetNumber: int, hiddenSheets: boolean) : Values
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| file | File | |
| password | string | |
| sheetNumber | int | |
| hiddenSheets | boolean |
Return
( Values )
_xls.read(input: Storage) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | Storage | Excel file reference. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: Storage, hiddenSheets: boolean) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | Storage | Excel file reference. |
| hiddenSheets | boolean | It also processes hidden spreadsheets. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: Storage, sheetNumber: int) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | Storage | Excel file reference. |
| sheetNumber | int | Spreadsheet number. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: Storage, sheetNumber: int, hiddenSheets: boolean) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | Storage | Excel file reference. |
| sheetNumber | int | Spreadsheet number. |
| hiddenSheets | boolean | It also processes hidden spreadsheets. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: Storage, hiddenSheets: string) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | Storage | Excel file reference. |
| hiddenSheets | string | It also processes hidden spreadsheets. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: Storage, sheetNumber: string, hiddenSheets: boolean) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | Storage | Excel file reference. |
| sheetNumber | string | Spreadsheet number. |
| hiddenSheets | boolean | It also processes hidden spreadsheets. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(input: Storage, sheetNumber: string, hiddenSheets: int) : Values
Description
Reads an Excel file, obtains all data.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| input | Storage | Excel file reference. |
| sheetNumber | string | Spreadsheet number. |
| hiddenSheets | int | It also processes hidden spreadsheets. |
Return
( Values )
Structure with all the data obtained by reading and processing the Excel files.
_xls.read(storage: Storage, password: string, sheetNumber: int, hiddenSheets: boolean) : Values
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| storage | Storage | |
| password | string | |
| sheetNumber | int | |
| hiddenSheets | boolean |
Return
( Values )
row
_xls.create().row(rowIndex: int) : org.apache.poi.ss.usermodel.Row
Description
Gets a row from the spreadsheet and if it does not exist then it will be created.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| rowIndex | int | Line number. |
Return
( org.apache.poi.ss.usermodel.Row )
Line representation object.
_xls.create().row(sheet: org.apache.poi.ss.usermodel.Sheet, rowIndex: int) : org.apache.poi.ss.usermodel.Row
Description
Gets a row from the spreadsheet and if it does not exist then it will be created.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| sheet | org.apache.poi.ss.usermodel.Sheet | Spreadsheet object. |
| rowIndex | int | Line number. |
Return
( org.apache.poi.ss.usermodel.Row )
Line representation object.
safeSheetName
_xls.safeSheetName(nameProposal: string) : string
Description
Transforms the passed text to be a valid spreadsheet name while complying with Excel rules.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| nameProposal | string | Name that should be transformed. |
Return
( string )
Valid name to be used as the name of the spreadsheet.
_xls.safeSheetName(nameProposal: string, replaceChar: char) : string
Description
Transforms the passed text to be a valid spreadsheet name while complying with Excel rules.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| nameProposal | string | Name that should be transformed. |
| replaceChar | char | Replacement character. |
Return
( string )
Valid name to be used as the name of the spreadsheet.
save
_xls.create().save(output: OutputStream) : void
Description
Writes the data from the final file to the output.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| output | OutputStream | Output where the file will be saved. |
Return
( void )
_xls.create().save(file: File) : void
Description
Writes the data to the final file.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| file | File | File that will be saved. |
Return
( void )
_xls.create().save(output: OutputStream) : void
Description
Writes the data from the final file to the output.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| output | OutputStream | Output where the file will be saved. |
Return
( void )
_xls.create().save(storage: Storage) : void
Description
Writes the data from the final file to the internal storage of the application.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| storage | Storage | Storage reference where the file will be saved. |
Return
( void )
setCellData
_xls.setCellData(row: int, col: int, data: Values | DataSchema | java.util.Map) : XLS
Description
Insert data in a specific cell.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| row | int | Line number. |
| col | int | Column number. |
| data | _Values | DataSchema | java.util.Map_ |
Return
( XLS )
The current instance of the XLS resource.
_xls.setCellData(row: int, col: int, data: Values) : XLS
Description
Insert data in a specific cell.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| row | int | Line number. |
| col | int | Column number. |
| data | Values | Data to be inserted. |
Return
( XLS )
The current instance of the XLS resource.
_xls.setCellData(cell: org.apache.poi.ss.usermodel.Cell, data: Values | DataSchema | java.util.Map) : XLS
Description
Insert data in a specific cell.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| cell | org.apache.poi.ss.usermodel.Cell | Cell object. |
| data | _Values | DataSchema | java.util.Map_ |
Return
( XLS )
The current instance of the XLS resource.
_xls.setCellData(cell: org.apache.poi.ss.usermodel.Cell, data: Values) : XLS
Description
Insert data in a specific cell.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| cell | org.apache.poi.ss.usermodel.Cell | Cell object. |
| data | Values | Data to be inserted. |
Return
( XLS )
The current instance of the XLS resource.
_xls.setCellData(sheet: org.apache.poi.ss.usermodel.Sheet, row: int, col: int, data: Values | DataSchema | java.util.Map) : XLS
Description
Inserts data into a specific cell in a spreadsheet.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| sheet | org.apache.poi.ss.usermodel.Sheet | Spreadsheet object. |
| row | int | Line number. |
| col | int | Column number. |
| data | _Values | DataSchema | java.util.Map_ |
Return
( XLS )
The current instance of the XLS resource.
_xls.setCellData(sheet: org.apache.poi.ss.usermodel.Sheet, row: int, col: int, data: Values) : XLS
Description
Inserts data into a specific cell in a spreadsheet.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| sheet | org.apache.poi.ss.usermodel.Sheet | Spreadsheet object. |
| row | int | Line number. |
| col | int | Column number. |
| data | Values | Data to be inserted. |
Return
( XLS )
The current instance of the XLS resource.
sheet
_xls.create().sheet() : org.apache.poi.ss.usermodel.Sheet
Description
To obtain the current spreadsheet that is being used to manipulate the data.
How To Use
const spreadsheet = _xls.create().sheet();
Return
( org.apache.poi.ss.usermodel.Sheet )
Gets the current spreadsheet.
units
_xls.units() : java.lang.Class
Description
It obtains the types of units predefined in Excel, useful to perform the conversion between pixels and points.
Return
( java.lang.Class )
The Apache POI class that helps you manipulate Excel units.
validSheetName
_xls.validSheetName(nameProposal: string) : boolean
Description
Checks whether the passed text is a valid spreadsheet name that complies with Excel rules.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| nameProposal | string | Name that must be validated. |
Return
( boolean )
Whether it is valid to be used as a spreadsheet name.
verticalAlignment
_xls.verticalAlignment(type: string) : org.apache.poi.ss.usermodel.VerticalAlignment
Description
Generates vertical alignment.
Attributes
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| type | string | Vertical alignment type name, supports:
|
Return
( org.apache.poi.ss.usermodel.VerticalAlignment )
The vertical alignment configured with the defined type.
workbook
_xls.create().workbook() : org.apache.poi.ss.usermodel.Workbook
Description
Creates a new Excel document.
How To Use
const workbook = _xls.create().workbook();
Return
( org.apache.poi.ss.usermodel.Workbook )
Gets the workbook.