Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Description

Copies a worksheet in the workbook to another position in the workbook.

C#
vb.net

Parameters

sheet
A Worksheet object representing the sheet to copy.
position
The 0-based position at which to insert a copy of the specified worksheet. If position is less than 0, it is inserted before the first sheet in the workbook. If position is equal to or greater than Worksheets.Count, it is inserted after the last worksheet.
newName
the new name to use for this worksheet.

Remarks

This method is intended to allow for copying of sheets from one position to another within a single workbook. To copy content from a worksheet in one workbook to worksheet in another workbook, use the Worksheet.CopyPaste

Examples

C#
vb.net
  • No labels