The Artima Developer Community
Sponsored Link

Java Answers Forum
Two pages are coming one is blank and one with data when downloading a csv

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
vaibhav jain

Posts: 1
Nickname: vabtcs
Registered: Dec, 2006

Two pages are coming one is blank and one with data when downloading a csv Posted: Dec 18, 2006 7:54 AM
Reply to this message Reply
Advertisement
When downlaoding a EXCEL file from a link a dialouge box is coming with a new page and when clicked on open button two windows open one is blank on which open buttons was there and excel sheet is getting open in another page.I need only excel with the entries.The code which we are using is :-


String strHeader = "attachement; filename="+strFileName;
//String strHeader = "inline; filename="+strFileName;
//res.setContentType("application/octet-stream");
res.setHeader("Content-Disposition: Attachment ",strHeader);

if (("RTQueueData.xls").equals(strFileName)){
logger.debug("Setting Xls Format");
//res.setContentType("application/vnd.ms-excel");
//res.setContentType("application/octet-stream");
//res.setContentType("text/octet-stream");
res.setContentType("application/download");
aCStrFileTypeCsv=false;
}

Topic: Two pages are coming one is blank and one with data when downloading a csv Previous Topic   Next Topic Topic: December 14 JAVA... bijhan here

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use