public class ReadFromMap { public static void main( String [] args ) throws Exception { try { /* to read the emp salary */ double claimCount = 0; POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream("c:/Documents and Settings/umat/My Documents/POI/MCIGeoMap1.xls")); HSSFWorkbook wb = new HSSFWorkbook(fs,true); HSSFSheet USData = wb.getSheetAt(1); // 2nd sheet has the US data /* change the claim amount of IL from 81 to 0 */ HSSFRow row = USData.getRow(15); HSSFCell cell = row.getCell((short)2); System.out.println("Cell Type:" + cell.getCellType()); claimCount = cell.getNumericCellValue(); System.out.println(claimCount); if ( claimCount == 81.00) cell.setCellValue(0); // Write the output to a file FileOutputStream fileOut = new FileOutputStream("c:/Documents and Settings/umat/My Documents/POI/MCIGeoMap1.xls"); wb.write(fileOut); fileOut.close(); } catch (Exception e) { e.printStackTrace(); } } }