Re: Why ADO with Excel formats text data with only numbers ?



Sorry, I've no direct experience doing this. The only knowledge I have
came from that google search. Have you tried googling for your error
message?

Perhaps the adonet group can provide more assistance.


JoseValencia wrote:
Hi Bob, thanks but it didn't work when I use the CAST function I get
an exception:
IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
Any help?

"Bob Barrows [MVP]" wrote:

JoseValencia wrote:
I'm using ADO.NET to read an excel file. In one of the columns I
have data that can be a mix of numbers and letters, but sometimes
there are only numbers. The value I get for the number 300015532 is
3.00016e+008. I want to capture the actual value 300015532 .
Anybody has fixed it?

Here is the connection string used in the datasource:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\file.xls;Extended
Properties="Excel 8.0;IMEX=1;"

Here is a sample of values of such column:
300014AKB
300014AKQ
3000152TQ
300014AGY
300015532 --> This failed
Will this help?

http://groups.google.com/group/comp.databases.ms-sqlserver/browse_frm/thread/1678755b6673b51a/72f03347c3c0dbd9?lnk=st&q=%22Excel+8.0%3BIMEX%3D1%3B%22+number+as+text&rnum=8&hl=en#72f03347c3c0dbd9
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get
a quicker response by posting to the newsgroup.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages

  • Mahjong FAQs
    ... FAQ 4b - Added link to new Chinese-language site about Japanese mahjong. ... Introduction to Mah-Jongg Newsgroup ... FAQ11b Origins: Precursor Games ... NEWSGROUP POSTING ARCHIVES: ...
    (rec.games.mahjong)
  • Mah-Jongg FAQs
    ... Introduction to Mah-Jongg Newsgroup ... FAQ11b Origins: Precursor Games ... American Mah-Jongg FAQs ... NEWSGROUP POSTING ARCHIVES: ...
    (rec.games.mahjong)
  • Mah Jong FAQs
    ... Introduction to Mah-Jongg Newsgroup ... FAQ11b Origins: Precursor Games ... American Mah-Jongg FAQs ... NEWSGROUP POSTING ARCHIVES: ...
    (rec.games.mahjong)
  • Mah-Jongg FAQs updated
    ... FAQ 4a - Added a teacher listing. ... Introduction to Mah-Jongg Newsgroup ... FAQ11b Origins: Precursor Games ... NEWSGROUP POSTING ARCHIVES: ...
    (rec.games.mahjong)
  • Re: Mah-Jongg FAQs updated
    ... FAQ 5 - Added a link to free mah-jongg tile graphics, ... Introduction to Mah-Jongg Newsgroup ... FAQ11b Origins: Precursor Games ... NEWSGROUP POSTING ARCHIVES: ...
    (rec.games.mahjong)