Ola pessoal, desenvolvi um relatório e estou exportando para XLS e visualizo em um popup e passo por outpustream para o popup. Tudo esta ok consigo ver e editar o xls.
Meu problema é quando vou salvar, simplesmente a toolbar do excel não aparece no meu popup, ja tentei colocar toolbar=yes no window.open mas não aparece, alguem sabe como fazer para aparecer a toolbar do excel ???
Grande tem como você me dizer como faço para visualizar no navegador esse xls. O meu só aparece para salvar.
meu código:
ServletOutputStreamservletOutPutStream=response.getOutputStream();ByteArrayOutputStreambyteOutPutStream=newByteArrayOutputStream();StringtipoRelatorio=(String)request.getSession().getAttribute("relatorioTipo");JasperPrintrelatorio=(JasperPrint)request.getSession().getAttribute("relatorio");try{//testa tipo de arquivoif(tipoRelatorio.equals("pdf")){JasperExportManager.exportReportToPdfStream(relatorio,byteOutPutStream);response.setContentType("application/pdf");}//fim if pdfif(tipoRelatorio.equals("xls")){JExcelApiExporterexporter=newJExcelApiExporter();exporter.setParameter(JRXlsExporterParameter.JASPER_PRINT,relatorio);exporter.setParameter(JRXlsExporterParameter.OUTPUT_STREAM,byteOutPutStream);exporter.setParameter(JRXlsExporterParameter.OUTPUT_FILE_NAME,"relatorio.xls");exporter.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE,Boolean.TRUE);exporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,Boolean.TRUE);exporter.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE,Boolean.TRUE);exporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND,Boolean.FALSE);exporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,Boolean.TRUE);exporter.exportReport();response.setContentType("application/vnd.ms-excel");}//fim if xls//escreve arquivo na páginaresponse.setContentLength(byteOutPutStream.size());servletOutPutStream.write(byteOutPutStream.toByteArray(),0,byteOutPutStream.size());servletOutPutStream.flush();}//fim trycatch(JRExceptione){e.printStackTrace();}//fim catch