Write value to cell - < excel_cell_set >() ... [Pro]
Excel: Write value to cell <excel_cell_set>(Workbook identifier,Column,Row,"Value") Available in: Professional edition
|
This command writes a value to defined cell of currently active worksheet.
|
#
|
Parameter name
|
Parameter description
|
1
|
Workbook identifier
|
A workbook identifier previously obtained by "open workbook" command.
|
2
|
Column
|
Cell column identifier. For example: F
|
3
|
Row
|
Cell row identifier. For example: 21
|
4
|
Value
|
A value to write to the cell.
|
|
|
Example (Macro Steps):
|
1
|
<#> <#> This macro shows how to write data to Excel cell
|
2
|
<#> <#> and how to read it again
|
3
|
Macro execution: ONLY COMMANDS
|
4
|
Excel: Open/Create workbook "" (Worksheet = "", Show = "Yes", Workbook identifier = "wbi")
|
5
|
Excel: Write value to cell [ B 2 ] <--- B2 value (Workbook identifier = %wbi%)
|
6
|
Excel: Read cell value [ B 2 ] ---> vCellB2 (Workbook identifier = %wbi%)
|
7
|
<#> <#> Let's see what we have written..
|
8
|
Message SHOW "Information" : "%vCellB2%" (other parameters: x = -100, y = -100, Window title = , Buttons = OK, Timeout (seconds) = 0, Always on top = No).
|
9
|
Excel: Close workbook "%wbi%" (SAVE = "No")
|
|
Example (Plain Text):
<#> This macro shows how to write data to Excel cell
<#> and how to read it again
<cmds>
<excel_wb_open>("","",1,wbi)
<excel_cell_set>(%wbi%,B,2,"B2 value")
<excel_cell_get>(%wbi%,B,2,vCellB2)
<#> Let's see what we have written..
<msg>(-100,-100,"%vCellB2%","",1,0,0,0)
<excel_wb_close>(%wbi%,0)