hello everyone ,
Is there any option to generate Excel sheet using record set obtained using the Select command ?. I tried to generate excel sheet using INTO OUTFILE command but I’m facing two issues,
1.The generated file doesn’t have any headings like NAME, DATE etc. Only data which is saved in db is getting written in that file.
2.I’m not able to provide custom location for generating report.
I’m using MySQL as back-end . please help me out .
You would only get a CSV file using INTO OUTFILE and not a real Excel file.
And don’t forget that this will save the file on the server, not on your computer if this is a desktop app.
You can generate XML Excel files quite easily with Xojo using a recordSet and some basic string commands.
Creating a real Excel file using the ExcelApplication Xojo class only works on Windows.
And as always, there’s the MBS Solution
Why not just use Excel’s Import from database function?
ExcelApplication is not working
way more information required
what platform ?
code you’re trying etc
ExcelApplication is Windows only and requires excel installed.
MBS XL Plugin can work cross platform and does not require Excel.
If you are developing on Windows make sure you’ve copied the office automation plugin from the extras folder & restart Xojo.
MBS XL Plugin works well. We use it daily.
.xlsx files are in fact zipped xml files.
rename a xlsx file in .zip, uncompress it and the format to be generated is not very complicated to reverse.
for .xls files, it’s more complicated.
Thanks , i will try with the plugin.
One more option i found is report in xojo . I’m able to print it as PDF. But its actually converting the report as a image and saving . I cannot select any text in that after saving .
StyledTextPrinter is not working with report .