You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Sushama <su...@rave-tech.com> on 2005/08/05 13:41:36 UTC

POI -Support for MDL ISIS

Hi,
Can please anybody tell me wheather POI supports MDL ISIS?
I cant to show chemical structures in excel using ISIS.
I am using POI to create excel.
ISIS interpreates chime string("$CHEMSCAPE 1.0.0 0 2") which should be in 2nd 
cell of first row. ).I am trying to set this value in excel sheet using POI.
The program rund fine creating an excel file but when i open this file my excel 
application crashes.
I have MDL ISIS installed on my machine.
The code I am using is as follows.

public class TestISIS 
{
        public static void main(String[] args) 
        {
                try
                {
                
                HSSFWorkbook wb = new HSSFWorkbook();
                HSSFSheet sheet1 = wb.createSheet("sheet");
                HSSFRow row0 = sheet1.createRow((short)0);
                                
                row0.createCell((short)1).setCellValue("$CHEMSCAPE 1.0.0 0 2");
                row0.createCell((short)2).setCellValue("Title");
                row0.createCell((short)3).setCellValue("Date");
               /* HSSFCell cell = row0.createCell((short)1);
                cell.setCellType(HSSFCell.CELL_TYPE_STRING);
                cell.setCellValue("$CHEMSCAPE");*/
  
                // Write the output to a file
                FileOutputStream fileOut = new FileOutputStream
("C:\\TestISIS.xls");
                wb.write(fileOut); 
                fileOut.close(); // if not closed then file is not created
                }catch(Exception e)
                {
                        System.out.println("Exception "+e);
                }
        }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/