The value is being passed as "D4265" from the Excel file but the value being read is " " (empty string). The format of the field in Excel is "Text". If the alpha character is removed, it will be read.
Main Topics
Browse All Topics
I'm using a Microsoft.Jet OLEDB connector to work with Excel. During processing of the cells of the Excel sheet, some cells that have an alphanumeric combination, i.e. "D4265", "ALXD6", etc&won't read correctly. I am converting the Excel file to an XML string and passing this to a Web Service that converts the XML string to a DataSet. I then traverse the dataset to get the specific data from the cells and storing them, by column, in arrays. All arrays are string arrays and I am getting all of the data from the dataset using "dSet.Tables[0].Rows[j].It
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
You might want to set IMEX=1 in your Jet based connection string.
The jet driver sometimes has problems determining column types, especially if the content contains values that look like numbers but are in fact text. IMEX=1 tells it to always treat them as text.
Here's an article that explains IMEX and is also related to generating XML so may be quite useful
http://www.codeproject.com
Business Accounts
Answer for Membership
by: Steve_afPosted on 2009-01-21 at 13:44:55ID: 23434373
In your If statement above, do the cells you are processing have a value like "D4265" ?
emArray[0] .ToString( ).ToUpper( ).StartsWi th("A")
If so, you just have to add StartsWith, like
///////////////////
if (dSet.Tables[0].Rows[j].It
//////////////////
I hope its that simple. :)