You could create a simple html file with embedded css for the font and
number formating, then rename to *.xls. To see an example of the formatting
save an Excle spread sheet as html and look at the css created and adopt.

Another route would be to generate MS Open XML, but that contains a lot of
baggage.

JoeM

----- Original Message -----
From: "Haas, Matt (CL Tech Sv)" <matt.haas@xxxxxxxxxxx>
To: "Web Enabling the AS400 / iSeries" <web400@xxxxxxxxxxxx>
Sent: Monday, November 26, 2007 11:44 AM
Subject: Re: [WEB400] Download data from AS400 into Excel: controlling the
font to use


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.


--------------------------------------------------------------------------
------

--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.