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
dc_excel2array issue
dc_excel2array issue
There are only 10 kinds of people - those who understand binary and those who don't 

Re: dc_excel2array issue
I had the same problem. Look in "User Contributions', topic 'Importing Excel To A Dbf' to see how I handle it.
Gene B
Gene B
Re: dc_excel2array issue
how did you "format" Columne ? are Array Element "String" ?BruceN wrote:... but has decimal points even though I format the entire column as text in excel.
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
Jimmy
Re: dc_excel2array issue
Make sure that you set the cell to "Text" in Excel.
The eXpress train is coming - and it has more cars.