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



Feb 14, 2012, 1:07 PM
4 Posts

Exporting entire xPage Excel

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: Excel Export entire xPage
  • Replies: 0
Hi All,
 
I'm trying to export an entire xPage to excel. 
I know you can "write" to excel using the an xPage agent..but why should I recreate the xPage I already created to show my results.
So I did find that creating a button on an xPage OR put the next code on an xPage in the "afterRenderResponse" event, export the entire xPage to Excel.
 

var exCon = facesContext.getExternalContext();

var response = exCon.getResponse();

response.setContentType("application/vnd.ms-excel");

response.setHeader("Cache-Control", "no-cache");

response.setHeader("Content-disposition", "attachment; filename=export.xls");

There is 1 problem. When Excel opens it tells that he does not find certain stylesheets.
I can reduce the error to only having the default stylesheets not found.
 
Missing file: c:\domjava\xsp\theme\webstandard\csp.css
Missing file: c:\domjava\xsp\thme\webstandard\xspLTR.css
 
These are also removable by removing the default theme in the application properties, xPage and put <empty> as default theme... but then your design is messed up.
 
Anybody an idea how to remove those 2 default stylesheets on 1 xPage?
 
Regards,
 
Peter   
 
 
 

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