dc_excel2array issue

This forum is for eXpress++ general support.
Post Reply
Message
Author
BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

dc_excel2array issue

#1 Post by BruceN »

I'm having an issue with the array created by this. I think the problem is within excel, not Roger's function.

If I have data in a column that is a large number (such as a UPC code or a numeric ID that is 15-20 characters long) and needs to be treated as text (for example one ID might be '123456789012345', and another one could be 'ABC123DEF'), what comes into the array is sometimes numeric and sometimes text but has decimal points even though I format the entire column as text in excel.

Also, if I go into edit on a given field in excel, the data exports correctly.. if I don't it doesn't. Example:

123456789012345
123456789801237
123458890756444

if I click to edit in the first 2 cells, but not the third, the array returned will be (text values):
'123456789012345'
'123456789801237'
'123458890756444.00'

any thoughts??? searching on line shows a lot of people having this same issue with excel formatting.

thanks
There are only 10 kinds of people - those who understand binary and those who don't :)

User avatar
GeneB
Posts: 158
Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:

Re: dc_excel2array issue

#2 Post by GeneB »

I had the same problem. Look in "User Contributions', topic 'Importing Excel To A Dbf' to see how I handle it.
Gene B

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: dc_excel2array issue

#3 Post by Auge_Ohr »

BruceN wrote:... but has decimal points even though I format the entire column as text in excel.
how did you "format" Columne ? are Array Element "String" ?

i would use Excel "Marco Editor" before "format" it manuell and than have a look at the Macro.
i "think" it must be

Code: Select all

oSheet:Columns(i):NumberFormat  := "@"
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: dc_excel2array issue

#4 Post by rdonnay »

Make sure that you set the cell to "Text" in Excel.
The eXpress train is coming - and it has more cars.

Post Reply