I want to create a cell having a reference to another cell in the 
file "Nom_de_fichier". I use this method which is normally doing this. But it 
doesn't work at all. Nothing is changed in the file 

An example of execution: Create_cell_with_Reference(0,0,"B1",file.xls);
which normally should put in the cell A1 of the file "file.xls" a reference to 
B1.
   
       static HSSFCell Crate_Cell_With_Ref(int ligne_cell_Ref,int 
row_Cell_Ref,String cell_Normale,String Nom_Fichier) throws IOException{
        
 POIFSFileSystem fs =
           new POIFSFileSystem(new FileInputStream(Nom_Fichier));
         HSSFWorkbook wb = new HSSFWorkbook(fs);
         HSSFSheet sheet = wb.getSheetAt(0);
         HSSFRow row = sheet.getRow(ligne_cell_Ref);
         HSSFCell cell = row.getCell((short)row_Cell_Ref);
         String formula = cell_Normale; 
         cell.setCellFormula(formula);
         //I update the modified file
         FileOutputStream fileOut = new FileOutputStream(Nom_Fichier);
         wb.write(fileOut);
         fileOut.close();
         return cell;
          
       
    
    }

Can you help me find the problem?
Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/

Reply via email to