Boa tarde,
gostaria de saber como eu coloco um arquivo .xls para fazer download
Muito Obrigado.
Boa tarde,
gostaria de saber como eu coloco um arquivo .xls para fazer download
Muito Obrigado.
colocar aonde, megaupload ? usando qual tecnologia ?
na verdade eu fiz assim:
# public HashMap relExcel() {
#
# String sql = req.getParameter("pSql");
# try{
# DAOExcelSql dao = new DAOExcelSql();
#
# List<String> NomeClunas = dao.consultaNmeColunas(sql);
# List<Object> DadosColunas = dao.consultaDadosColunas(sql);
# int count = 0;
#
# StringBuilder sb = new StringBuilder();
#
#
#
# for (Iterator<String> it = NomeClunas.iterator(); it.hasNext();) {
# sb.append(it.next()+"\t");
# }
# sb.append("\n");
# for (Iterator<Object> it = DadosColunas.iterator(); it.hasNext();) {
#
# if(count < NomeClunas.size()){
# sb.append(it.next());
# sb.append("\t");
# count ++;
# }else if(count == NomeClunas.size()){
# sb.append("\t");
# sb.append("\n");
# count = 0;
# }
#
# }
# File rel = new File("c:\\relTeste.xls");// aqui eu estou salvando o relatorio no C, mas eu nao queria salvar ele em lugar nenhum so abri-lo
# rel.createNewFile();
# FileWriter relExcel = new FileWriter(rel);
# relExcel.write(new String(sb));
#
# String sOs = System.getProperty("os.name").toUpperCase();
# if(sOs.equals("WINDOWS NT") || sOs.equals("WINDOWS 2000") || sOs.equals("WINDOWS XP")){
# Runtime.getRuntime().exec("C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE " + rel.getAbsolutePath());
# } else{
# Runtime.getRuntime().exec("C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE " + rel.getAbsolutePath());
# }
#
# relExcel.flush();
# relExcel.close();
#
#
# }catch (Exception ex){
# ex.printStackTrace();
# }
# return dados;
# }
tem jeito de em vez de abrir em ecxel colocar esse File para download?
no caso eu criaria o file em uma pasta no servidor