Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modifying Excel Import Procedure?
Message
From
11/04/2002 13:54:24
N. Lea
Nic Cross Enterprises
Valencia, California, United States
 
 
To
11/04/2002 12:53:07
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00643706
Message ID:
00643860
Views:
10
Not by chance you would know what this error means:

OLE IDispatch exception code 0 from Microsoft Excel: No list was found. Select a single cell within your list, and then click the command again....

I thought it would take the whole active sheet 1. I used the code that was suggested to me.



>>>Lea
>>>
>>>if you are certain that only 2 fields are not displayed properly, then why dont u write a small procedure to modify the table after the data is imported.
>>
>>I had thought of that; however, when the data is imported from XLS to DBF, the date fields are converted to whole numbers and then to character. So the date: 01/01/2002 comes out to be 39781. What the heck is that? I tried to reconvert the information by CTOD(), but the system could not reverse the process. I wanted to even see if the process was faulty. I used the import wizard and did it that way. then I copied the structure as it was to a new table/cursor. Then i used the append from and not all the data came over. Blows my mind because the table was all character and it should have done the same procedure as the import wizard. This is all done in VFP 7.0
>
>Lea,
>Hilmar's suggestion is the way to go IMHO.
>Import or Append from type XLS refers to excel 2.0 - 4.0, XL5 excel5 and xl8 to excel97.
>Another way is to save as excel 97 and import .. type xl8.
>
>If you're using VFP7 then use object browser to get xlDBF3 value. It's defined as 8. From enumerates node click and drag&drop xlFileFormat node to a code window. VFP would write the defines for you.
>
>Excel keeps dates as numbers with a base date that differs from system to system by one day. Put 1 to a column and format as date to see what your system uses as base (^1900/1/1 or ^1899/12/31).
>Cetin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform