As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Hi, The output of my report is Excel and in order to format it for printing (landscape, borders, etc) I used the HTMLFORM approach (trying to steer away from templates...). One of my output columns is strings, but some values can be numbers only, for example 001234. If I just output to Excel (ON TABLE PCHOLD FORMAT EXL2K) everything looks ok, the leading zeros appear. Once I change to output to use the HTMLFORM, the leading zeros are dropped.
Any ideas of how I can make sure I get those zeros? Thanks, Luminita
I've never seen code like this used inside an HTMLFORM. How did you come up with this?
Since you're using this type of code, can't you address a specific column and use styling to change the number format? Or is the number format code (NumberFormat ss:Format="@") removing the leading zeros?
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
DEFINE FILE CAR
DEF_COL_A/A20=IF COUNTRY EQ 'ENGLAND' THEN '001234' ELSE IF COUNTRY EQ 'ITALY' THEN '004231' ELSE '12346687';
END
TABLE FILE CAR
PRINT
DEF_COL_A
COMPUTE COM_COL_A/A20=IF COUNTRY EQ 'ENGLAND' THEN '001234 ' ELSE IF COUNTRY EQ 'ITALY' THEN '004231 ' ELSE '12346687 ';
CAR
COUNTRY
ON TABLE HOLD AS HLD_1 FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=DATA,COLUMN=N1,CLASS=NUMASTEXT,$
TYPE=DATA,COLUMN=N2,CLASS=NUMASNUM,$
ENDSTYLE
END
SET HTMLFORMTYPE=XLS
-HTMLFORM BEGIN
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html;">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 10">
<style>
TD.NUMASTEXT
{mso-number-format:\@}
TD.NUMASNUM
{mso-number-format:\#\,\#\#0\.00}
</style>
</head>
<body>
<table>
<tr>
<td class="accountnum">
!IBI.FIL.HLD_1;
</td>
</tr></table>
</body>
-HTMLFORM END
Prasad, Thank you so much, that worked like a charm! I am having a hard time finding help documents for stuff like this, any tips or tricks on how to go about that?
Francis, I sort of "inherited" this code from other developers, and have been tweaking it to suit my needs. It's a good alternative to using the Excel templates.
Thank you! Luminita
7.6.6 on AIX platform Output: variety (Excel, HTML and PDF)
Posts: 33 | Location: New Hampshire | Registered: October 17, 2007
s, I sort of "inherited" this code from other developers, and have been
@Francis, That's the type of code that Excel (and other MS Office docs) uses under the covers. I believe specifically if it is an "online" file.
To see this in action: 1. Open Excel. 2. Create a new Spreadsheet. 3. Populate with data (or don't). 4. Save as file type HTML. 5. Close Excel. 6. Open output in a text editor (suggest TextPad). 7. Bask in the glory of the Office-ified HTML/XML.
ABT, thanks for that info. At least it appears my assumption is correct regarding the Excel styling. It seems that this type of code would be hard to maintain...
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server