locked
Excel Interop DLL RRS feed

  • Question

  • User-516163735 posted

    Other than Excel Interop DLL how to work with excel files in VB.NET

    Friday, October 8, 2010 6:48 AM

Answers

  • User793200426 posted

    Hello,

    you can try GemBox.Spreadsheet .NET Excel library. It doesn't use Excel Interop and it is fast and simple to use. Supports XLS, XLSX, ODS, CSV, HTML formats.

    Here is an Excel VB.NET sample how to export DataSet to Excel:

    ' Create new ExcelFile.
    Dim ef = New ExcelFile()
    
    ' Imports all the tables from DataSet to new file.
    For Each dataTable As DataTable In dataSet.Tables
    	' Add new worksheet to the file.
    	Dim ws = ef.Worksheets.Add(dataTable.TableName)
    
    	' Insert the data from DataTable to the worksheet starting at cell "A1".
    	ws.InsertDataTable(dataTable, "A1", True)
    Next
    
    ' Save the file to XLS format.
    ef.SaveXls("DataSet.xls")
    



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 11, 2010 4:51 AM

All replies

  • User530177176 posted

    Other than Excel Interop DLL how to work with excel files in VB.NET

    As per my understanding there is no any way to use excel files in vs.net other than Excel Interop DLL.

    Friday, October 8, 2010 7:18 AM
  • User530177176 posted

    You can found some third party dll.


    Friday, October 8, 2010 7:21 AM
  • User-516163735 posted

    Hi,

    Thank you for the reply, can u suggest any such third party DLL(s).


    Regards


    Friday, October 8, 2010 8:57 AM
  • User530177176 posted

    You can check this

    http://www.tmssoftware.com/site/flexcelnet.asp?gclid=CP_X5bi4yKQCFYWRzAodLQloFA


    Sunday, October 10, 2010 9:51 AM
  • User530177176 posted

    This is also good

    http://www.sharewareconnection.com/bytescout-spreadsheet-sdk.htm


    Sunday, October 10, 2010 9:53 AM
  • User-516163735 posted

    Hi,

    I'm getting an error message i.e. "Excel Application not Defined", "Excel Workbook not Defined","Excel worksheet not Defined".

    Actually I'm working in a project where i need to import and export from excel (either open office or Ms-Excel) and there is no MS-Excel installed in my PC. So cannot add the Excel Interop DLL. Can anyone help me in this regard? How to work in this sinario.


    Regards


    Monday, October 11, 2010 3:04 AM
  • User32394187 posted

    I think you need to install MS-excel in the first place so that you can retrieve COM reference

    Monday, October 11, 2010 3:12 AM
  • User793200426 posted

    Hello,

    you can try GemBox.Spreadsheet .NET Excel library. It doesn't use Excel Interop and it is fast and simple to use. Supports XLS, XLSX, ODS, CSV, HTML formats.

    Here is an Excel VB.NET sample how to export DataSet to Excel:

    ' Create new ExcelFile.
    Dim ef = New ExcelFile()
    
    ' Imports all the tables from DataSet to new file.
    For Each dataTable As DataTable In dataSet.Tables
    	' Add new worksheet to the file.
    	Dim ws = ef.Worksheets.Add(dataTable.TableName)
    
    	' Insert the data from DataTable to the worksheet starting at cell "A1".
    	ws.InsertDataTable(dataTable, "A1", True)
    Next
    
    ' Save the file to XLS format.
    ef.SaveXls("DataSet.xls")
    



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 11, 2010 4:51 AM