Button handy |
---|
blank | true |
---|
color | #0052CC |
---|
name | Send Feedback |
---|
link | https://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=excelSetCell+-+15484062 |
---|
width | auto |
---|
|
Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | excelSetCell(workbookFID, value, [worksheet_name], cell_addr_or_x_y) | Package | excel | Alias | | Pkg Usage | setCell(workbookFID, value, [worksheet_name], cell_addr_or_x_y) |
|
Description
Excerpt |
---|
|
Updates the value of the specified cell in the open workbook. |
Updates the value of the specified cell in the open workbook.
...
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
workbookFID | Integer | Yes | The file id of the open workbook. The file id is returned from running the excelOpenWorkbook() routine. | value | String | No | The value that the cell should be set to. | worksheet_name | String | No | The name of the worksheet the cell is on. | cell_addr_or_x_y | String | No | The cell address, like A1, or the cell coordinates like 2, 3. |
|
Return Type
Boolean
Returns true if the operation was successful, false otherwise.
Example
Example 1
Add a new row and data to an existing workbook.
Code Block |
---|
|
use "excel";
int fid = openWorkbook("snakes.xlsx");
setCurrentSheet(fid, "Venemous Snakes");
addRow(fid, 1);
setCell(fid, "Lawyer Snake", 1, 0);
insetCellsetCell(fid, "Cheatum Maximus", 1, 1);
closeWorkbook(fid); |
Result: A new row with data is added to the worksheet.
Note |
---|
Click here to download the workbook used in this example. |
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "excel_routine" and space = currentSpace ( ) |
---|
labels | array_routines |
---|
|