Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

excelRemoveSheet(workbookFID, worksheet_name)

Package

excel

Alias

Pkg Usage

removeSheet(workbookFID, worksheet_name)

Description

Excerpt
hiddentrue
Removes the selected sheet from an open workbook.

Removes the selected sheet from an open workbook.

Parameters

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

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.

worksheet_name

String

Yes

The name of the worksheet to be deleted

Return Type

Boolean

Returns true if the operation was successful, false otherwise.

Example

Opens a workbook, deletes a sheet and then saves and closes the workbook.

Code Block
languagejs
use "excel";
int fid = openWorkbook("snakes.xlsx");
removeSheet(fid, "Venemous Snakes", 4);
closeWorkbook(fid);

Result: The 'Venemous Snakes' sheet will be removed.

Note

Click here to download the workbook used in this example.

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "excel_routine" and space = currentSpace ( )
labelsarray_routines