Live SpreadsheetGear API Samples
Workbook Miscellaneous Manage Sheets, Worksheets and Chart Sheets
IWorkbook contains several collections to access various sheets in a workbook. IWorkbook.Sheets[...] contains all sheets in a workbook (worksheets, chart sheets as well as lesser-used "Macro Sheet" and "VB Module" sheet types. IWorkbook.Worksheets[...] contains only worksheets; IWorkbook.ChartSheets[...] contains only chart sheets. Also demonstrated is API to move and copy sheets from one location to another.
Run This Sample
Download File
Download an Excel Open XML Workbook (*.xlsx) file with the results of this sample.
Supporting Files
The following files are utilized by this sample: