locked
Excel generation! RRS feed

  • Question

  • User-1925567390 posted

    Hi,

    By default if we create an excel through code, it will create 3 sheets. In case I need to specify 5 sheets at the initial point then how should i proceed? It can be done through AddMethod, but it will add one by one sheet and again i have to move the sheet in proper order.

     Can all this be done at the time of excel creation and do not need to create the sheet one by one?

    Thanks in advance!

    Anurag

    Monday, August 8, 2011 10:29 AM

Answers

  • User1508394307 posted

    If you can use NPOI library, it can do it using HSSFWorkbook.CreateSheet method. I'm doing a lot with export-import from Excel and NPOI is my preferable choice.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 9, 2011 3:43 AM

All replies

  • User1508394307 posted

    If you can use NPOI library, it can do it using HSSFWorkbook.CreateSheet method. I'm doing a lot with export-import from Excel and NPOI is my preferable choice.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 9, 2011 3:43 AM
  • User-914536974 posted

    So far I am using Excel Jetcell .NET component. At their website you will find different Excel samples on C# / VB.NET.
    You can add worksheets one by one or insert them using worksheets collection of workbook object.

    It is quite good because does not use Excel Interop, supports various excel formats (xls, xlsx, ods, csv) 

    Tuesday, August 23, 2011 8:36 AM