It works fine. I have attached the TestISIS.xls Ramesh
-----Original Message----- From: news [mailto:[EMAIL PROTECTED] Behalf Of Sushama Sent: Donnerstag, 4. August 2005 16:47 To: [email protected] Subject: Setting String value in cell Hi, I am trying to set "$CHEMSCAPE 1.0.0 0 2" value in the second cell of first row. I have written following code which creats the excel file.But when I open the file the excel crashes.Can anyone explain me the same? I have tried to set this value as a String explicitly but even that dosent work. I want to set this string to get ISIS support for interpretation of data in excel file. I have MDL ISIS installed on my machine. 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"); /* HSSFCell cell = row0.createCell((short)1); cell.setCellType(HSSFCell.CELL_TYPE_STRING); cell.setCellValue("$CHEMSCAPE");*/ row1.createCell((short)1).setCellValue("abc"); // 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: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
TestISIS.xls
Description: TestISIS.xls
--------------------------------------------------------------------- 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/
