In addition to other suggestions on this thread, there is also a VFPx project that allows you to create XLSX files without Excel being installed. No COM automation involved. One of its core methods creates the output from a cursor or table. It's pretty easy to use and performs well. It also has read from XLSX functionality although I have not really used that other than to try it out.
https://github.com/ggreen86/XLXS-Workbook-Class
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Desmond Lloyd Sent: Monday, April 16, 2018 12:18 PM To: profoxtech@leafe.com Subject: VFP9 - Save as XLSX
Good Morning,
Need to be able to copy the contents of a cursor to an Excel file, but it needs to be in the xlsx.
Am a newbie to Excel Automation and have read that you can saveas, and it will save in the latest format. Well mine doesn't. oworkbook.version shows 16. (we are running Office 365)
Tried the SweetPotato method but it errors out. Not sure why.
Would someone be kind enough to point me in the right direction, with some possible examples...
TIA, Desmond