Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 12th, 2004, 03:07 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default 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
__________________
Brian
  #2 (permalink)  
Old April 14th, 2004, 10:54 AM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

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

  #3 (permalink)  
Old April 14th, 2004, 11:38 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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.
  #4 (permalink)  
Old April 14th, 2004, 12:15 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

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.

  #5 (permalink)  
Old April 14th, 2004, 02:12 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
import data from excel darkhalf Access 5 February 14th, 2008 11:48 AM
how to import excel data into sql server khaink ASP.NET 1.0 and 1.1 Basics 1 July 31st, 2007 09:10 PM
How can we import the data from Ms Excel balesh ASP.NET 1.0 and 1.1 Professional 1 June 8th, 2006 02:15 PM
Import Excel data into a workbook Derek_05 Excel VBA 5 May 31st, 2006 02:02 PM
how to import data from excel,csv into sql server therisingsun ASP.NET 1.0 and 1.1 Basics 2 October 1st, 2005 12:17 AM



All times are GMT -4. The time now is 01:03 PM.


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