添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
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:

report.getCellValue("A1");

Cell row and column numbers method:

report.getCellValue(1,1);

Example 2: In a general report, get the value of cell A1 by cell address

_g().getCellValue("A1");

Example 3: Get the value of cell A1 in the second sheet under the data entry preview

_g().getCellValue(1,1,1);

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:

Get cell value.cpt

1.gif

Mobile Only support general report "Data Entry Preview"
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:

report.setCellValue("A1","Order number");

By cell row and column number:

report.setCellValue(1,1,"Order number");

Example 2: Assign the value of "Order number" to cell A1 in a general report

_g().setCellValue("A1","Order number");

Example 3: Under the data entry preview, assign the value of "Order number" to cell A1 in the 2 sheets

_g().setCellValue(1,1,"Order number");

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:

Modify cell value.cpt

2.gif

Mobile Only support general report "Data Entry Preview"