|
I just changed some of my programs that generated CSV files (CPYTOSTMF and
so on) to get XLXS files using this Scott Forstie suggestion
Generating spreadsheet with SQL
(https://gist.github.com/forstie/2deda50658106461f650cd71917feff9)
Very good ... just a bit slowly for ACS job and java environment ... but
it works and i got my xlsx files
There only an annoying problem ... when my SQL statement returns 0 records
... ACS won't create the XLSX file.
Is there any setting to tell ACS
"Hey guy, don't worry about rows ... could you please give me back an xlsx
with my columns' headers?, thank you!"
maybe only in one-word parameter?
Thanks
Roberto
-- Create XLXS file from query SQL string
...[cut]
SET V_SQLSTMT='select * from sampledb.employee where 1=2';
SET CMDTEXT =
'STRQSH CMD(''java -jar /ACS/acsbundle.jar '
CONCAT '/plugin=cldownload /system=xxxxxx /clientfile='
CONCAT V_IFS_PATH
CONCAT ' /sql="'
CONCAT V_SQLSMT
CONCAT '"'')' ;
CALL QSYS2 . QCMDEXC ( CMDTEXT ) ;
--
--
Roberto De Pedrini - Faq400 Srl
http://blog.faq400.com/en *A new IBM i Blog from IBM i Italian
Community Faq400*
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.