Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Office 2007 compatibility issues
Message
 
To
04/02/2007 15:52:17
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01191826
Message ID:
01192265
Views:
34
>>>(Yes I had used my own filename and folder :-) )
>>>But:
>>>
>>>Sorry I still get a table with the structure in it and a million records with all NULLS
>>>just like before.
>>>What am I supposed to get??
>>>
>>>
>>>Peter
>>
>>Cursor aaaa must have all columns and rows from Excel sheet.
>>Strange, it works like a charm here.
>can you use the file i sent you by email
>and tell me how to use odbc to get at the data in it. I had never used odbc for that just COM

Strangest thing is that I have an exported from VFP Excel file, opened and Saved in new Excel format and the code I posted works with it. for your file:
lcFile = GETFILE([XLSX])
IF EMPTY(lcFile)
   RETURN
ENDIF
lcFoder = JUSTPATH(lcFile)

TEXT TO lcConnString NOSHOW PRETEXT 15 TEXTMERGE
     DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);
     UID=admin;
     FIL=excel 12.0;
     DriverId=1046;
     DefaultDir=<<lcFoder >>;
     DBQ=<<lcFile>>
ENDTEXT

lnSQL = SQLSTRINGCONNECT(lcConnString)
SQLEXEC(lnSQL,"SELECT * FROM [sheet1$]",[aaaa])
SQLDISCONNECT(0)
SELECT aaaa
BROWSE NORMAL
works, it must give you a cursor Aaaa with the same structure as Excel Sheet1
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform