Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to format a number in HTML output file with commas?

I have a straight table chart with numbers formatted as #,##0.  When the chart is output to an HTML file using the ExportEx or ExportHTML statement in a macro, the amount in the cell (TD tag) is not output with the commas inserted.  Is there an easy solution for this?

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

Just figured it out.  It turns out that the Num() function doesn't respect the regional settings like the manual says it should.  But wrapping the expression, e.g., Sum(Field1) in a Num() function with all parameters specified, like Num(Sum(Field1),'#,##0','.',',') works.

View solution in original post

2 Replies
fosuzuki
Partner - Specialist III
Partner - Specialist III

Hi,

one not-so-good workaround is to create another similtar table with the correct format, and use it in the export macro. You can minimize it and hide it under a text box with white background... difficult to maintain though...

Not applicable
Author

Just figured it out.  It turns out that the Num() function doesn't respect the regional settings like the manual says it should.  But wrapping the expression, e.g., Sum(Field1) in a Num() function with all parameters specified, like Num(Sum(Field1),'#,##0','.',',') works.