Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Import from Excel

Have you tried concerting/casting the problem field to text in the query?

Tim.


"Amy" wrote in message
oups.com...
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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Import from Excel

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Import from Excel

Hello Tim,

I have the same problem.

Can you tell me how to cast the problem field to text.
My excel sheet does not contain any headers.

Thanks,
Pradeep

"Tim Williams" wrote:

Have you tried concerting/casting the problem field to text in the query?

Tim.


"Amy" wrote in message
oups.com...
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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Import from Excel

What does your code look like?

Tim


"Pradeep S" wrote in message ...
Hello Tim,

I have the same problem.

Can you tell me how to cast the problem field to text.
My excel sheet does not contain any headers.

Thanks,
Pradeep

"Tim Williams" wrote:

Have you tried concerting/casting the problem field to text in the query?

Tim.


"Amy" wrote in message
oups.com...
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






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Import from Excel

Thanks for the response Tim.
I used IMEX=1 in the connection string and it started working.
Can you tell me what is the significance of that particular attribute.

Thank You,
Pradeep


"Tim Williams" wrote:

What does your code look like?

Tim


"Pradeep S" wrote in message ...
Hello Tim,

I have the same problem.

Can you tell me how to cast the problem field to text.
My excel sheet does not contain any headers.

Thanks,
Pradeep

"Tim Williams" wrote:

Have you tried concerting/casting the problem field to text in the query?

Tim.


"Amy" wrote in message
oups.com...
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









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Import from Excel

http://blogs.acceleration.net/ryan/a...01/11/477.aspx

Tim

"Pradeep S" wrote in message ...
Thanks for the response Tim.
I used IMEX=1 in the connection string and it started working.
Can you tell me what is the significance of that particular attribute.

Thank You,
Pradeep



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Import from Excel

Thanks Tim.

http://blogs.acceleration.net/ryan/a...01/11/477.aspx

Tim

"Pradeep S" wrote in message ...
Thanks for the response Tim.
I used IMEX=1 in the connection string and it started working.
Can you tell me what is the significance of that particular attribute.

Thank You,
Pradeep




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
import XML data...Is there a size limit on the import? MatthewG Excel Discussion (Misc queries) 0 February 10th 09 05:57 PM
How to Start Excel in Text Import Wizard for data import rlelvis Setting up and Configuration of Excel 0 July 10th 08 08:40 PM
Data Import to Excel Issue with Excel 2007 and Excel 2003 on same Melsh Excel Discussion (Misc queries) 0 August 1st 07 09:32 PM
How to import data from daily reports (excel) into excel database Import data from excel to excel Excel Discussion (Misc queries) 2 May 30th 06 04:18 PM
Import modules EXCEL caused an invalid page fault in EXCEL.EXE Janet Martin Excel Programming 6 August 1st 04 10:25 AM


All times are GMT +1. The time now is 09:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"