Skip to main content
Skip table of contents

f$Excel set cell


f$Excel set cell

Set the value of a cell on the current sheet. The cell is accessed via the line and column numbers. With this function you can modify the value of a cell as well as its formula. If the entered value begins with the character =, Excel interprets this value as a formula.If it uses the English commands and is syntactically correct, you receive the result value for the formula when reading (getting) the cell. If the formula returns an error, the f$Excel set cell function attempts to set the same formula again, although this time incorporating the current regional settings. In this way, non-English commands can also be used (e.g. =SUMME(...) instead of =SUM(...) for German). If a set of rules uses the country-specific commands, you must note that this set of rules no longer works correctly in an international environment.

Syntax:

Status = f$Excel('Cell', 'put', Row , Column , Value )

 

Argument

Type

Meaning

 

'Cell'

String

Keyword

 

'put'

String

Keyword

 

Line

Integer

Line number

 

Column

Integer

Column number

 

Value

Any

Value written into the cell

Result:

Integer

0: command executed successfully

Example:

Status = f$Excel('Workbook','open','c:\\temp\\test2.xls')
Status = f$Excel('Sheet', 'Open', 'Calculation')
Status = f$Excel('Cell', 'set',1,1, '11')
Status = f$Excel('Cell', 'set',1,2, 11.5)
Status = f$Excel('Close',1)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.