Ugrás a fő tartalomhoz
Verzió: 15

EXCEL_WRITE_CELL

Writes a value into a specific cell in an excel spreadsheet.

Description

Writes a value into a specific cell in an excel spreadsheet. This command works only if an excel file was previously opened with the EXCEL_OPEN command. After all the operations with a specific excel file are done within a script, it is advised to close the excel file with the EXCEL_CLOSE command.

Syntax

EXCEL_WRITE_CELL [Worksheet name] [Column name] [Row number] [Output]

Command parameters

Command parameterAssignmentValue formatInput options
Worksheet nameRequiredStringLocal, variable
Column nameRequiredStringLocal, variable
Row numberRequiredIntegerLocal, variable
OutputRequiredStringLocal, variable

Worksheet name:

Name of the worksheet within the currently opened excel file.

Column name:

Name of the column within the specified worksheet of the currently opened excel file.

Row number:

Number of the row within the column.

Output:

Output value that will be written into the specified cell.

Sample code

Command only:

EXCEL_WRITE_CELL Sheet1 A 1 "Excel Output"

With added open, close commands and variable definition:

EXCEL_OPEN c:\Temp\Sample_Excel.xlsx

$Excel_Output=Test_Value

EXCEL_WRITE_CELL Sheet1 A 1 $Excel_Output

EXCEL_CLOSE