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