Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE error code export to Excel..
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00210740
Message ID:
00210931
Views:
49
>The code I found on the thread
>
>_VFP.DataToClip(,,3)
> oExcel = Create("Excel.Application")
> oExcel.Workbooks.Add()
> oRange = oExcel.Range("A1",Chr(65+FCount()-1)+Alltrim(Str(RecCount())))
> oRange.PasteSpecial()
> oExcel.Visible = .T.

I'm the one Christof came up with the code for :) I'm not sure about your problem, but this code would not work on some machines here, including my own. I had to use

oExcel = GetObject("Excel.Sheet")

You might try that...needs a couple other code changes from this change. Also note that you need one more row to account for the headers where the RecCount() is, RecCount()+1...after a few changes, works perfectly, and there's no hassle with XL5 coversion, this method goes directly to Excel97...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform