Enum SheetType

SheetType enumeration

Specifies the worksheet type.

public enum SheetType

Values

NameValueDescription
VB0Visual Basic module
Worksheet1
Chart2Chart
BIFF4Macro3BIFF4 Macro sheet
InternationalMacro4International Macro sheet
Other5
Dialog6Dialog worksheet

Examples

using System;
using Aspose.Cells;

namespace AsposeCellsExamples
{
    public class CellsClassSheetTypeDemo
    {
        public static void Run()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();
            
            // Insert a new worksheet of type Worksheet at index 0
            Worksheet newWorksheet = workbook.Worksheets.Insert(0, SheetType.Worksheet);
            
            // Set the name of the new worksheet
            newWorksheet.Name = "InsertedSheet";
            
            // Access cells in the new worksheet and add some data
            newWorksheet.Cells["A1"].PutValue("This is a new worksheet");
            
            // Save the workbook
            workbook.Save("SheetTypeDemoOutput.xlsx");
        }
    }
}

See Also