1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

problem in header and content type

Discussion in 'ASP' started by vijayz, Apr 10, 2008.

  1. vijayz

    vijayz New Member

    Apr 10, 2008
    Likes Received:
    Trophy Points:
    my application aim is to download and upload data from excel sheet to mysql and mysql to excel sheet

    while downloading the data from mysql to excel my application fails, using Internet explorer . i can download only empty excel sheet and the data is not present.

    the headers i have i have used are
    response.setHeader("Content-Disposition", "inline; filename=" + title+".xls");
                 "must-revalidate, post-check=0, pre-check=0");
    			response.setHeader("Pragma", "no-cache");
    			response.setHeader("Expires", "0");
    			response.setContentType("application/vnd.ms-excel: xls, xlb: Microsoft Excel Document");
    			ServletOutputStream ot = response.getOutputStream();
    			byte[] blobdata1 = wb.getBytes();
    		        int off = 0;
    			int l = (int) wb.getBytes().length;
    			log.debug("Document Length is " + l);
    			ot.write(blobdata1, 0, l);
    i would like to know how to set the headers and content type?..........
    Last edited by a moderator: Apr 10, 2008

Share This Page