Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query Excel
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01361454
Message ID:
01361496
Views:
11
>Thanks. I have looked at the old thread and I am typing everything correct. I can open the file with Excel 2007 but still get the error "Sheet1$" is an invalid object.
>
>lcConn = "Driver= {Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)}; DBQ=C:\_v7data\ImportTest\export\excel2007export.xlsx"
>
>lnHandle = SQLSTRINGCONNECT( lcConn )
>lcCmd = "Select * FROM [Sheet1$] "
>
>lnSuccess = SQLEXEC( lnHandle, lcCmd, "mycursor" )

Did you try double quotes instead of [] as was in that message?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform