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



Mar 30, 2012, 3:56 PM
11 Posts

export view to excel size limitation?

  • Category: Other
  • Platform: Windows
  • Release: 8.5.3
  • Role:
  • Tags: Excel export
  • Replies: 0
I use the rendered=false xpage to run the scripts in the Page event "afterRenderResponse" see code below
The view contains about 54,000 entries. I put a stopper on entrie count 20,000 just to test, the xls file is created, but at row 18,314 data is truncated. The saved file size is about 3,479kb.
According to the log file, the script ran all the way to the end, and the viewEntry loop did looped on all 20,000 entries. So the truncated data is because of the writer has a size limit? Since the script printed to log file on the last view entry count, I assume it is definitly not caused by timed out. Apart from writer size, is there a server setting that limits the download size? maybe... any ideas?
 
anyway, here is the code I use.

var exCon = facesContext.getExternalContext();

var writer = facesContext.getResponseWriter();

var response = exCon.getResponse();

print("about to open view " + sessionScope.exportViewName);

var myView:NotesView = database.getView(sessionScope.exportViewName);

var viewNav:NotesViewNavigator = myView.createViewNav();

var viewEnt:NotesViewEntry = viewNav.getFirst();

//doe the column Heading first

var ColumnHeaders:java.util.Vector = myView.getColumnNames();

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

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

writer.write("<table>");

writer.write("<thead><tr>");

if (ColumnHeaders==null)print("error");

for (var i=0; i<ColumnHeaders.length; i++) {

writer.write("<td><b>" + ColumnHeaders[i] + "</b></td>");

}

writer.write("</tr></thead>");

var cnt = 0;

while (viewEnt != null && cnt<=20000) {

print("cnt" + cnt);

cnt = cnt + 1;

writer.write("<tr>");

for (var ent = 0; ent < viewEnt.getColumnValues().length; ent++) {

writer.write("<td>" + viewEnt.getColumnValues()[ent]+ "</td>");

}

writer.write("</tr>");

var tmpviewEnt = viewNav.getNext(viewEnt);

viewEnt.recycle();

viewEnt = tmpviewEnt;

}

writer.write("</table>");

writer.endDocument();

 

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