Import whole content or data of excel sheet .XLSB file into a datatable in C#.net RRS feed

  • Question

  • User671836881 posted

    Hi Team ,

    Could you please let me know the correct way and if possible a piece of code to get the content of .XLSB file into a datatable. I am working with Visual Studio 2015 and my Operating system is Windows 8 with 64 bit OS. 

    Could you please let us know need to install any other DLL s or any other way without adding any references. 



    Monday, July 24, 2017 11:14 AM

All replies

  • User269602965 posted

    There are many ways to read XLSB files, from Excel Interop to ACE OLEDB to many proprietary commercial libraries (SpreadsheetGear, Telerik controls,  and long list of others).

    ACE OLEDB is free and convenient to use from within .NET. 

    Google search term "Provider=Microsoft.ACE.OLEDB.12.0" for plenty of examples.  You will have to download the ACE OLEDB driver from Microsoft (32-bit and 64-bit versions).

    Create a connection string and then load your data into desired target (Dataset-table, DataGrid, etc.)

    Tuesday, July 25, 2017 1:30 AM