How to add a Worksheet to a Workbook in Excel
C#
1
Posts
1
Posters
0
Views
1
Watching
-
Hi, I am writing an application in which I have to add different worksheets to a workbook in excel. I would like the code to insert in this line: wbk.Worksheets.Add(, , , );. It is expecting a (Object Before, Object After, Object Count, Object Type). Should I use this code to add the worksheet? If not, please advise. The code I have so far is below: Microsoft.Office.Interop.Excel.Workbook wbk = _appClass.Workbooks.Add(XlWBATemplate.xlWBATWorksheet); ... ... wbk.Worksheets.Add(, , , ); Please Help!!
Mvelo Walaza Developer Telkom SA