R
Rainer
Hello,
I am trying to edit certain cells of an existing xls-file. As this file
contains numerous formula, the output.xls (temp.xls) does not calculate
all formula. There are several reference errors!
Is it possible, that the workspace flows over or what is the problem?
Thanks in advance, Rainer
fis = new
FileInputStream("data/H2master_01engl.xls");
wb = new HSSFWorkbook(fis);
bedeutungGruppe = wb.getSheet("CEM_In");
bedeutungGruppe2 = wb.getSheet("CEM_Para");
CellReference cellRef = new CellReference("B14");
HSSFRow cellRow =
bedeutungGruppe2.getRow(cellRef.getRow());
HSSFCell tmpCell1 =
cellRow.getCell(cellRef.getCol());
tmpCell1.setCellValue(Float.parseFloat(txtA1.getText()));
cellRef = new CellReference("B15");
cellRow =
bedeutungGruppe2.getRow(cellRef.getRow());
HSSFCell tmpCell2 =
cellRow.getCell(cellRef.getCol());
tmpCell2.setCellValue(Float.parseFloat(txtA2.getText()));
cellRef = new CellReference("B12");
cellRow = bedeutungGruppe.getRow(cellRef.getRow());
HSSFCell tmpCell3 =
cellRow.getCell(cellRef.getCol());
tmpCell3.setCellValue(Float.parseFloat(txtA3.getText()));
cellRef = new CellReference("B15");
cellRow = bedeutungGruppe.getRow(cellRef.getRow());
HSSFCell tmpCell4 =
cellRow.getCell(cellRef.getCol());
tmpCell4.setCellValue(Float.parseFloat(txtA4.getText()));
FileOutputStream fileOut = new
FileOutputStream("data/temp.xls");
wb.write(fileOut);
fileOut.close();
I am trying to edit certain cells of an existing xls-file. As this file
contains numerous formula, the output.xls (temp.xls) does not calculate
all formula. There are several reference errors!
Is it possible, that the workspace flows over or what is the problem?
Thanks in advance, Rainer
fis = new
FileInputStream("data/H2master_01engl.xls");
wb = new HSSFWorkbook(fis);
bedeutungGruppe = wb.getSheet("CEM_In");
bedeutungGruppe2 = wb.getSheet("CEM_Para");
CellReference cellRef = new CellReference("B14");
HSSFRow cellRow =
bedeutungGruppe2.getRow(cellRef.getRow());
HSSFCell tmpCell1 =
cellRow.getCell(cellRef.getCol());
tmpCell1.setCellValue(Float.parseFloat(txtA1.getText()));
cellRef = new CellReference("B15");
cellRow =
bedeutungGruppe2.getRow(cellRef.getRow());
HSSFCell tmpCell2 =
cellRow.getCell(cellRef.getCol());
tmpCell2.setCellValue(Float.parseFloat(txtA2.getText()));
cellRef = new CellReference("B12");
cellRow = bedeutungGruppe.getRow(cellRef.getRow());
HSSFCell tmpCell3 =
cellRow.getCell(cellRef.getCol());
tmpCell3.setCellValue(Float.parseFloat(txtA3.getText()));
cellRef = new CellReference("B15");
cellRow = bedeutungGruppe.getRow(cellRef.getRow());
HSSFCell tmpCell4 =
cellRow.getCell(cellRef.getCol());
tmpCell4.setCellValue(Float.parseFloat(txtA4.getText()));
FileOutputStream fileOut = new
FileOutputStream("data/temp.xls");
wb.write(fileOut);
fileOut.close();