Ver Mensaje Individual
  #8 (permalink)  
Antiguo 28/11/2011, 12:13
Avatar de douglasloza
douglasloza
 
Fecha de Ingreso: abril-2008
Ubicación: Santa Tecla, El Salvador, El Salvador
Mensajes: 35
Antigüedad: 16 años, 1 mes
Puntos: 0
Respuesta: Excel con Jakarta's POI

Amigos... les comento que logré solucionar el problema :D wiiii xD
Código Javascript:
Ver original
  1. try {
  2.             InputStream inp = new FileInputStream("C:/facturas/indicador.xls");
  3.             //InputStream inp = new FileInputStream("workbook.xlsx");
  4.  
  5.             Workbook wb =  new HSSFWorkbook(inp);
  6.             Sheet sheet = wb.getSheetAt(0);
  7.             Row row = sheet.getRow(9);
  8.             Cell cell = row.getCell(2);
  9.             /*if (cell == null) {
  10.                 cell = row.createCell(3);
  11.             }*/
  12.             cell.setCellType(Cell.CELL_TYPE_STRING);
  13.             cell.setCellValue("1000");
  14.  
  15.             // Write the output to a file
  16.             FileOutputStream fileOut = new FileOutputStream("C:/facturas/indicador.xls");
  17.             wb.write(fileOut);
  18.             fileOut.close();
  19.         } catch (Exception ex) {
  20.             JOptionPane.showMessageDialog(rootPane, ex);
  21.         }


Es exactamente igual a escribir un fichero, solo que en lugar de darle por ejemplo createShet, le damos getSheetAt... y luego como ya hemos seleccionado la celda que queremos alterar, le samos un celda.setCellValue("VALOR DE LA CELDA");
Y eso es todo... Muchas Gracias a los que se tomaron la molestia :)
Infinitamente agradecido :)