Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using TableToExcel.prg
Message
 
 
To
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Using TableToExcel.prg
Miscellaneous
Thread ID:
01660176
Message ID:
01660176
Views:
99
Hi Greg (or anybody else who can make a suggestion).

I downloaded your VfpxWorkBookxlsx.vcx and trying to apply it to my program where a cursor has to be exported to an excel. I use your sample program Tabletoexcel.prg:
	LOCAL lcTable, loExcel, lcExcel
		lcExcel = SYS(5) + ADDBS(SYS(2003)) + "Northwind Customers.xlsx"
		lcTable = ADDBS(SYS(2004)) + "Samples\Northwind\customers.dbf"
		lcTable = LOCFILE(lcTable)
		IF !ISNULL(lcTable) AND FILE(lcTable)
			loExcel = NEWOBJECT("VFPxWorkbookXLSX", "VFPxWorkbookXLSX.vcx")
			loExcel.SaveTabletoWorkbook(lcTable, lcExcel, .T., .T.)
		ENDIF
But in my case (in my program), user already has a cursor open and needs to export it to Excel. Your code (above) seems to rely on the .DBF being opened by the method .SaveTableToWorkBook(). Do you know how (and where) I can modify your code to use whatever cursor is open and convert it to the specified excel file name, instead of trying to open it?

TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform