PC Review


Reply
Thread Tools Rate Thread

Import from Excel

 
 
Amy
Guest
Posts: n/a
 
      30th Mar 2006
I have an ASP.NET (VB) routine that imports a lot of data from an Excel

spreadsheet
into a OleDbDataAdapter, and then into a database table. The import
has been working fine until now, but my latest spreadsheet has a column

that can be either completely numeric or alphanumeric. As long as the
first row contains alphanumeric everything is fine, but the latest
spreadsheet I received contained completely numeric data in the first
10 rows. This caused some of the alphanumeric data to not be read in.
I have been using IMEX=1 in my connection string which fixed this type
of situation I had when I first started working on this project, but it

doesn't seem to be working on this particular field.


Any suggestions?


Thanks,
Amy Bolden

 
Reply With Quote
 
 
 
 
Zack Barresse
Guest
Posts: n/a
 
      30th Mar 2006
Hi Amy,

You may want to try microsoft.public.dotnet.languages.vb

--
Regards,
Zack Barresse, aka firefytr
To email, remove NOSPAM


"Amy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have an ASP.NET (VB) routine that imports a lot of data from an Excel
>
> spreadsheet
> into a OleDbDataAdapter, and then into a database table. The import
> has been working fine until now, but my latest spreadsheet has a column
>
> that can be either completely numeric or alphanumeric. As long as the
> first row contains alphanumeric everything is fine, but the latest
> spreadsheet I received contained completely numeric data in the first
> 10 rows. This caused some of the alphanumeric data to not be read in.
> I have been using IMEX=1 in my connection string which fixed this type
> of situation I had when I first started working on this project, but it
>
> doesn't seem to be working on this particular field.
>
>
> Any suggestions?
>
>
> Thanks,
> Amy Bolden
>



 
Reply With Quote
 
 
 
 
Amy
Guest
Posts: n/a
 
      31st Mar 2006
I was able to solve my problem by putting HDR=No in the connection
string. Then I insert the header text as the first record for the
field, thereby forcing Excel to make the field a string. This seems to
work well, although it is a little goofy.
Thanks,
Amy

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Import versus XML Import =?Utf-8?B?R2F6?= Microsoft Dot NET 2 5th Jul 2006 06:35 AM
Import an Excel File into Existing Table not using the Import Wiza =?Utf-8?B?TG91aXNl?= Microsoft Access VBA Modules 1 2nd Mar 2006 11:01 PM
I cannot get import wizard to work to import excel to access tabl =?Utf-8?B?c3VwZW1zZA==?= Microsoft Access External Data 2 8th Sep 2005 11:36 PM
Import from Excel - not all values import comish4lif@verizon.net Microsoft Access External Data 1 21st Jul 2005 09:56 PM
I can't find my import wizard to import contacts from Excel. =?Utf-8?B?VG9t?= Microsoft Outlook Discussion 1 16th May 2005 01:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:42 AM.