HSSF workbook

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();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top