Inserting a new blank worksheet in a workbook

Is there a way to insert a new blank worksheet at a particular position in an existing workbook? I know how to create a workbook -

workbook = application.Workbooks.Create(tabs);

I would appreciate response from Syncfusion!

Thanks!


2 Replies

NK NOLONGERWITHCOMPANYAmanda Kabak March 8, 2011 10:32 PM UTC

Hey, you can do this by creating a worksheet at the end and then moving it to whatever index you want:

This creates a new page called Summary and moves it to the first position.
application.Workbooks[0].Worksheets.Create("Summary");
application.Workbooks[0].Worksheets["Summary"].Move(0);
application.Workbooks[0].Worksheets[0].Activate();




JB John Bowlin Bosco K Syncfusion Team March 9, 2011 10:53 AM UTC

Hi Ram,

Thank you very much for your interest in Syncfusion Products.

Using Essential XlsIO, a blank worksheet can be added to a particular location in the worksheet with the help of move method by specifying the position where to place the created worksheet. We have created a sample and it has been attached for your reference. Please try the sample and let us know if this helps you.

Please let us know if you require any further clarifications.

Thanks,
Pauline Bosco.



AddBlankSheetSample_98533_73ed9411.zip

Loader.
Up arrow icon