We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Better "Add New Sheet"

Current code to create a new sheet:

Workbook wb = new Workbook();
Worksheet newSheet = wb.Worksheets[wb.Worksheets.Add()];

What I suggest:

var wb = new Workbook();
//Simpler
Worksheet newSheet1 = wb.Worksheets.New();
Worksheet newSheet2 = wb.Worksheets.New("Sheet Name");
int insertIndex = 1;
Worksheet newSheet3 = wb.Worksheets.New("Sheet Name", insertIndex);
// and more Powerful
DataTable myDataTable = LoadDataTable();
Worksheet newSheet4 = wb.Worksheets.NewWith(myDataTable);
DataSet myDataSet = LoadDataSet();
Worksheet newSheet5 = wb.Worksheets.NewWith(myDataSet);

@Flithor,

Thanks for your suggestions.

Unfortunately we have no plan to add or change it. The reason is we try to make the APIs backward compatible as our hundred of users are using Aspose.Cells in their diverse applications. If we change the APIs, they have to do special adaptation or modifications in the existing code on larger scale, so they would not like it.