Peter,
You're generating a CSV file, not an Excel spreadsheet. CSV files don't allow you to specify formatting information. If you know Java, you can use POI to do this (I think Scott Klement has RPG wrappers for this but in a web environment, you are likely going to get better performance using Tomcat or WebSphere since you'll only start up a single JVM). There are also third party tools you can purchase to do this but I haven't used any of them.
Matt
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Peter Vidal
Sent: Monday, November 26, 2007 12:14 PM
To: web400@xxxxxxxxxxxx
Subject: [WEB400] Download data from AS400 into Excel: controlling the font to use
Hi list!
I am downloading data from the AS400 into Excel, via a webpage. I am
using the combination of HTML, JS and NET.DATA, all wrapped in a CGI. Is
working good. What I want to accomplish is to set the spreadsheet to use
the font COURIER NEW instead of the default font.
Is there a way to do this? The CGI that I have is this:
====================================================================
define {
%list "," VLIST
%list "," NLIST
DTW_PRINT_HEADER="NO"
SHOWSQL="NO"
xref = ""
%}
%Message {
100: "No entries found that matched selection criteria.": continue
%}
%FUNCTION(DTW_SQL) sql_XREF () {
SELECT * FROM WHXREFS.$(xref)
%REPORT {
$(NLIST)
%ROW {
$(VLIST)
%}
%}
%}
%HTML(ftdwnfile.csv) {
Content-type: application/msexcel-comma
Content-encoding: ebcdic
Content-Disposition: attachment; filename=ftdwnfile.csv
@sql_XREF ()
%}
====================================================================
TIA!!!
Peter Vidal
MAPICS IT Technical Support Team / SR System Analyst
10540 Ridge Rd., Ste 203, New Port Richey, FL 34654-5111
Tel:727-849-9999, x2414 Fax:727-815-3120
http://www.pall.com
"Integrity without knowledge is weak and useless, and knowledge without
integrity is dangerous and dreadful."
Samuel Johnson (1709-1784)
--------------------------------------------------------------------------------
Attention:
This communication may contain information that is confidential,
privileged and/or exempt from disclosure under applicable law.
If you are not the intended recipient, please notify the sender
immediately and delete the original, all attachments, and all
copies of this communication.
--------------------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.