Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modifying Excel Import Procedure?
Message
From
12/04/2002 06:58:46
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
11/04/2002 13:54:24
N. Lea
Nic Cross Enterprises
Valencia, California, United States
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00643706
Message ID:
00644143
Views:
10
Yes it'd work with activesheet.
However activesheet might not contain data that looks like a 'database' - list. A typical worksheet that could be saved as DBF would have headers in first row followed by data (something like a browse window shows).
If your first row doesn't conatin the headers but another row than point where it's or define a region as 'database' in excel. Msg means this, for details check Q46228 on MSDN online help.
Cetin

>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform