Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel to SQL, C# libraries

I have an excel spreadsheet that a client has given me which is broken down into multiple worksheets. I need to extract certain columns from each worksheet on a row-by-row basis and to iterate through each worksheet (all identical templates) to dump the data in a database table. It also needs to weed out any duplicates present.

I wish to build a simple asp.net front-end, using C# for the language.

What libraries would you recommend? I have yet to find any that are of any use.

Any help will be supremely appreciated!!! :-)

P.S. The best I have found so far is OpenXML (Microsoft libraries)

like image 528
Nick Lewis Avatar asked Oct 06 '11 17:10

Nick Lewis


People also ask

Can you convert Excel into SQL?

Import data directly from Excel files by using the SQL Server Import and Export Wizard. You also have the option to save the settings as a SQL Server Integration Services (SSIS) package that you can customize and reuse later. In SQL Server Management Studio, connect to an instance of the SQL Server Database Engine.

Can you create a SQL database from Excel?

The SQL Spreads Table Creator is a new feature in SQL Spreads 5.0 to create SQL Server tables directly from within Excel and pre-load them with the existing data in your Excel spreadsheet. The Table Creator makes it possible to create SQL Server tables in just a few clicks.

Can we read Excel file in C?

To open an Excel File using C#, we use WorkBook. Load and specify the path of the Excel file (. xlsx). Each WorkBook can have multiple WorkSheet objects.


1 Answers

This can be done without any libraries at all, SOL Server supports importing excel files directly in to it using the data import wizard. I would recommend turning the entire workbook in to a database and work with it from there.

like image 142
Scott Chamberlain Avatar answered Oct 19 '22 23:10

Scott Chamberlain