-2

I am parsing some data into a Excel sheet and I am generating 3 Excel sheets (Compliance1.xls, Compliance2.xls, Compliance3.xls) by using the below code:

    owb.SaveAs(Input_File+@"\Compliance1.xls",
Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookNormal, 
Type.Missing, Type.Missing, false, false, 
Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange                    
    Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); 

I want one Excel file to be generated with 3 of compliance sheets in it.

Community
  • 1
  • 1

1 Answers1

0

here are some examples . please go through these.

How to create excel file with multiple sheets from DataSet using C#

Trying to add multiple sheets to excel

http://www.c-sharpcorner.com/blogs/generate-excel-with-multiple-sheet-from-dataset1

Please do google before you post new question.

Community
  • 1
  • 1
Waqas
  • 847
  • 4
  • 14
  • 36
  • From the Help Center "Provide context for links Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline." – Steve Jun 09 '16 at 10:14