Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating XLSX from a .DB

Status
Not open for further replies.

GordonSH

Technical User
Mar 30, 2021
28
US
Currently I have a routine that creates an XLS file from a .db
Code:
*Command7.click - Create the Receipt.xls File
Select receipt
set safe off
copy all to receipt.xls type xls *(Can I specify [b]xlsx[/b] instead or not?)
set safe on
Messagebox("Receipt XLS File Created", 0, "Receipt XLS Status")
select medspot
Set Order to WIZARD_1
Select donate
Thisform.refresh
 
Oddly enough, I'll be discussing this exact topic in my session at Virtual Fox Fest on Thursday.

Before I summarize options, one comment. NEVER NEVER NEVER use TYPE XLS. That's Excel 2.0 format and it can't handle dates properly.

So, natively, from VFP without any other tools, you can COPY TO XL5 (that's Excel 5 format) or CSV. That doesn't give you an XLSX. As people here have shown you, you can use automation to open the file in Excel and SaveAs to XLSX.

If you don't have Excel available on the machine where you're doing the saving, there are two tools built by community members.

The first is Vilhelm-Ion Praisach's program that someone already pointed you to.

The second is Greg Green's XLSX Workbook, which is part of VFPX:
My paper that includes this material (as part of a broader look at crosstabs and pivot tables) is at
Tamar
 
Thank you Chris, Mike, Griff, Dan & Tamar!!!!!
You all rock and are awesome!
I have it working now.
Blessings to you all.
Gordon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top