getCellValue
Method | getCellValue(sheetindex,address|row,col) | Get the value of a specific cell, the parameter can be the cell address or the cell row and column number |
---|---|---|
Parameter | address: string row: number, col: number | sheetindex:Fill in the sheetindex number, starting from 0, if omitted, the default is the first sheet address:Cell address, string, such as 'A1', specifying sheet is not supported when using cell address row:Cell row number,number col:Cell column number,number |
Return value | void | |
Example | Example 1: If the obtained report block object is defined as report , get the value of cell A1 Cell address method:
Cell row and column numbers method:
Example 2: In a general report, get the value of cell A1 by cell address
Example 3: Get the value of cell A1 in the second sheet under the data entry preview
Example 4: In the dashboardt, get the value of cell A1 of report0 report block by cell address _g().getWidgetByName('report0').getCellValue("A1"); | |
Application example | Click the button to get the value of cell A1: Click to download the template: | |
Mobile | Only support general report "Data Entry Preview" |
setCellValue
Method | setCellValue(sheetindex,address,value|row,col,value) | Assign a value to a specific cell, the parameter can be the cell address or the cell row and column number |
---|---|---|
Parameter | address: string row: number col: number value: string | sheetindex:Fill in the sheetindex number, starting from 0, if omitted, the default is the first sheet address:Cell address, string, such as 'A1', does not support specifying sheet when using cell address row:Cell row number, number col:cell column number, number value: The value to assign the point to the cell, string |
Return value | void | |
Example | Example 1: If the obtained report block object is defined as report , assign the value of "Order number" to cell A1 By cell address:
By cell row and column number:
Example 2: Assign the value of "Order number" to cell A1 in a general report
Example 3: Under the data entry preview, assign the value of "Order number" to cell A1 in the 2 sheets
Example 4: In the dashboard, the A1 cell of the report0 report block is assigned the value "Order number" _g().getWidgetByName('report0').setCellValue("A1","Order number"); | |
Application example | Click the button to assign the value "Order Number" to cell A1: Click to download the template: | |
Mobile | Only support general report "Data Entry Preview" |