How to import high format data from Excel to database?
What is the best way to import high format data from Excel to SQL Server. Basically I have 250 Excel files exported from the reporting tool in the format our business users prefer. It is a third party tool and cannot export data in any other format. I need to "clean up" these files monthly and import them into the database. I want to use SQL Server 2005
The file formats are as follows:
Report Name
Report Description
MTH/DEC/2003 MTH/JAN/2004 MTH/FEB/2004
Data Type Data Type Data Type
Grouping 1 1900 1700 2800
Grouping 2 1500 900 1300
Detail 300 500 1000
Detail 1100 200 200
Detail 100 200 100
source to share
you can write a simple parser. there are many api that will handle reading excel files.
I wrote one in java and it only took a day or two.
here is one api.
Luck
EDIT: Forgetting to mention, we also need sql api like JDBC . Again we are using JDBC for most of our applications and it works great.
source to share
Personally, I would do it using SSIS. Perhaps nothing is trivial as the file format looks relatively complex (but I suspect it is true no matter which tool you use), but as long as it stays consistent it will run fast every month and packages SSIS is easy to take control of the source. Since SSIS is part of SQL Server, it is easy to ensure that all servers are available. The key is to have a good understanding of how this format relates to how you store data in the database. This is the hard part no matter what tool you use.
source to share
Assuming you have Microsoft Excel, you can also use your own ActiveX interface, open to you. More information here:
http://msdn.microsoft.com/en-us/library/wss56bz7(VS.80).aspx
You can use this in anything ActiveX can use (C ++, VB6, VB.NET, etc.) to create a parser, and also follow what Berek said.
source to share
For Java based application, POI ( http://poi.apache.org/ ) is pretty good for Excel integration applications.