This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Oct 25, 2011, 2:49 PM
35 Posts

Format columns for Excel

  • Category: Other
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 4
Hi,
In LS I usually format my Excel reports columns with 

xlsSheet.Columns("D:D").NumberFormat = "0"

xlsSheet.Columns("E:E").NumberFormat = "$* #,##0.00"    ...

 How would I do the same when writing html in an output?

output += "<td>" + doc.getItemValue("orders").toString().replace("[", "").replace("]", "") + "</td>";

output += "<td>" + doc.getItemValue("cto").toString().replace("[", "").replace("]", "") + "</td>";

Any help is greatly appreciated! 
Oct 25, 2011, 6:11 PM
149 Posts
Re: Format columns for Excel
 
 
I suggest you go to any website that has a table and try to copy/paste to excel
if it work check the html source.
 
/Thomas
Oct 26, 2011, 6:24 PM
272 Posts
Re: Format columns for Excel
Hi,
 
to get the format you want  you could use the @Text formula. Please have a look at "@Text with number values" section.
 
Hope this helps
Sven
Nov 3, 2011, 6:33 PM
35 Posts
Re: Format columns for Excel
Thanks, but I don't think I asked correctly.  I am trying to format my Excel column..from my script, not my values.  When I open my Excel, I want to have it already formated to show all my values as currency, or any other format.
Any clue? 
 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal