//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); IWorksheet worksheet = workbook.Worksheets.Add(); //workbook must contain one visible worksheet at least, if delete the one visible worksheet, it will throw exception. worksheet.Delete();
' Create a new Workbook Dim workbook As New Workbook Dim worksheet As IWorksheet = workbook.Worksheets.Add() 'workbook must contain one visible worksheet at least, if delete the one visible worksheet, it will throw exception. worksheet.Delete() ' save to an excel file workbook.Save("DeleteWorksheet.xlsx")