Unexplained IllegalMonitorStateExceptions are a common problem with
jdk1.2 and Win2K or 98. I would suggest you move up to jdk 1.3 if not
1.4. That will make this problem go away. 

Regards
-
Avik

On Tue, 2002-11-12 at 04:14, owenl wrote:
> Here is the class where the trouble shows up. I am using the jdk 1.2.2 on a
> window 98 system. I am using the jar file  jakarta-poi-1.8.0-dev-
> 20020919.jar. The workbook.xls file is nearly trivial with numerical
> values in cells A1 and B1. (I will attach the .java and .xls file as well)
> 
> thanks
>     Owen
> 
> import org.apache.poi.poifs.filesystem.POIFSFileSystem;
> import org.apache.poi.hssf.usermodel.HSSFWorkbook;
> import org.apache.poi.hssf.usermodel.HSSFSheet;
> import org.apache.poi.hssf.usermodel.HSSFRow;
> import org.apache.poi.hssf.usermodel.HSSFCell;
> 
> import java.io.FileInputStream;
> import java.io.FileOutputStream;
> import java.io.IOException;
> 
> public class setFormulaTest
> {
>     public static void main(String[] args)
>         throws IOException
>     {
>         POIFSFileSystem fs      =
>                 new POIFSFileSystem(new FileInputStream("workbook.xls"));
>         HSSFWorkbook wb = new HSSFWorkbook(fs);
>         HSSFSheet sheet = wb.getSheetAt(0);
>         HSSFRow row = sheet.getRow(0);
>         HSSFCell cell = row.getCell((short)0);
> 
>       cell.setCellFormula("B1");
> 
>         FileOutputStream fileOut = new FileOutputStream("workbook.xls");
>         wb.write(fileOut);
>         fileOut.close();
> 
>     }
> }
> 
> ----
> 

> --
> To unsubscribe, e-mail:   <mailto:poi-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <mailto:poi-user-help@;jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:poi-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:poi-user-help@;jakarta.apache.org>

Reply via email to