p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.x and 2.0 Application Design (http://p2p.wrox.com/forumdisplay.php?f=67)
-   -   Excel Data Import (http://p2p.wrox.com/showthread.php?t=11726)

bmains April 12th, 2004 03:07 PM

Excel Data Import
 
Hello,

I got to import data from Excel spreadsheets into my database, which is SQL Server. I know you can import the data from excel. However, my data is not formatted in a way which is easily importable. It may appear as below:

C1 C2 C3 C4
                  Header

Data Data Data Data

The C1-4 are obviously column headers. Anybody have an idea of what I can do in this instance to get the header in with the same row as the columns, so I can import via OLEDB?

This process can be either automatic or manual, by the way.

Thanks,

Brian

jbenson001 April 14th, 2004 10:54 AM

Are you using SQLServer DTS to import this. In your case, that would be the easiest way.


bmains April 14th, 2004 11:38 AM

I'm planning on using ADO.NET or DTS, however, the data's unformatted, and was wondering if anybody had a way to format this, other than manually.

jbenson001 April 14th, 2004 12:15 PM

You can easily set up a DTS and not have to worry about formatting. When you set up the Transform Data Task, on the Options tab, you can specify what row to start pulling the information from. Accoring to your sample layout, it looks like it will be row 4. Let me know if this helps or you need more info.


bmains April 14th, 2004 02:12 PM

Yeah, though I need the header imported also, plus there is breaks between each section also, where there are 3-4 blank rows between section. Although I could go in and delete these with no problem...

I just need the header on the same row, and possibly other information too that might be at that level.

Thanks for your help.


All times are GMT -4. The time now is 04:49 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.