Well, monologue's are good!
but, yeah, good you got your problems fixed, thanks for investigating
and letting us know!
On Thu, 2003-11-20 at 01:49, Mauro Daniel Ardolino wrote:
> It seem it's a monologue, but well, here's the answer:
> The problem was sure a bug. I installed a new poi version and the problem
> was fixed.
> Now I'm using: poi-2.0-RC1-20031102.jar
>
> -- Mauro
>
>
> On Wed, 19 Nov 2003, Mauro Daniel Ardolino wrote:
>
> > Hey! I'm sorry! I didn't specify the problem:
> > Nothing appears in A1 of the first sheet of the resultant xls.
> > ;)
> > -- Mauro
> >
> > On Wed, 19 Nov 2003, Mauro Daniel Ardolino wrote:
> >
> > > Hello!
> > >
> > > I'm having a problem when I try to read/write an excel workbook with 2
> > > sheets.
> > >
> > > In the A1 of the second sheet I have a formula (cross sheet one!).
> > >
> > > The first sheet is empty.
> > >
> > > The program must set "hello" in A1 of the first sheet. And then save.
> > >
> > > Environment:
> > > - Linux RH73
> > > - JSDK 1.4.1_02
> > > - POI-VERSION: 1.10.0-dev-20030222
> > >
> > > Here's the code...do you see anything wrong?
> > >
> > > package ar.com.altersoft.msexcel.testing;
> > >
> > > import java.io.File;
> > > import java.io.FileInputStream;
> > > import java.io.FileNotFoundException;
> > > import java.io.FileOutputStream;
> > > import java.io.IOException;
> > >
> > > import org.apache.poi.hssf.usermodel.HSSFCell;
> > > import org.apache.poi.hssf.usermodel.HSSFRow;
> > > import org.apache.poi.hssf.usermodel.HSSFSheet;
> > > import org.apache.poi.hssf.usermodel.HSSFWorkbook;
> > > import org.apache.poi.poifs.filesystem.POIFSFileSystem;
> > >
> > >
> > > public class WritingAnExistingXlsTest {
> > > public static void main(String[] args) {
> > > try {
> > > FileInputStream fin = new
> > > FileInputStream("templateDemoTesting.xls");
> > > POIFSFileSystem poifs = new POIFSFileSystem(fin);
> > > HSSFWorkbook wb= new HSSFWorkbook(poifs);
> > > //
> > > HSSFSheet sheet=wb.getSheetAt(wb.getSheetIndex("page1"));
> > > //sheet.setSelected(true);
> > > HSSFRow row= sheet.getRow(0);
> > > if(row==null){
> > > row= sheet.createRow(0);
> > > }
> > > HSSFCell cell= row.getCell((short)0);
> > > if(cell==null){
> > > cell= row.createCell((short)0);
> > > }
> > > cell.setCellType(HSSFCell.CELL_TYPE_STRING);
> > > cell.setCellValue("hello");
> > > //
> > > FileOutputStream fileOut = new
> > > FileOutputStream("templateDemoTestingResult.xls");
> > > wb.write(fileOut);
> > > fileOut.close();
> > > } catch (FileNotFoundException e) {
> > > e.printStackTrace();
> > > } catch (IOException e) {
> > > e.printStackTrace();
> > > }
> > > }
> > >
> > > }// END CLASS
> > >
> > >
> > >
> > > Thanks in advance. Regards,
> > >
> > > -- Mauro
> > >
> > >
> > >
> > >
> >
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]