SpreadsheetClass

T

Tam Ha

Hi,

I have tried everything to add an extra worksheet into a SpreadsheetClass but have run out of things to try. Here's a the code snippet (C#).
SpreadsheetClass mySSheet = new SpreadsheetClass();
mySSheet.ActiveSheet.Cells[1,1]="First Name";
mySSheet.ActiveSheet.Cells[1,2]="Last Name";
etc, etc

mySSheet.Worksheets.Add("Sheet1","Sheet" ,cnt,XlSheetType.xlWorksheet); //TESTING LINE
The TESTING LINE will compile but errors during execution.

What should I put in the first and second parameter as all params are required. I also tried this in VB, but using Add(). The ASPX runs
but still there is only one sheet.

TIA.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top