Help me, please.
In the Exel document need to subjoin sheet 69.
If in Exel document include image then Exel document return defective.
When use poi-bin-3.5-beta5-20090219 return error:
Exception in tread "main"
java.lang.NoSuchMethodError:org.apache.poi.hssf.usermodel.HSSFSheet.addMergedRegion
<Lorg/apache/poi/hssf/unit/Region;>I ......;
When use poi-bin-3.2-FINAL-20081019 return defective document, error:
Error initialization VBA(265), and appeal restore Exel document
Code:
HSSFWorkbook wb ;
InputStream fileInput = null;
try {
fileInput = new FileInputStream(Pyt);
POIFSFileSystem fs111= new POIFSFileSystem(new FileInputStream(Pyt));
wb = new HSSFWorkbook(fs111);
fileInput.close();
}
catch(Exception e){
wb = new HSSFWorkbook();
}
HSSFSheet sheet =null;
if(wb.getSheetIndex("sheet69")<0){
sheet =wb.createSheet("sheet69");
wb.setSheetName( wb.getSheetIndex("sheet69"), "sheet69",
HSSFWorkbook.ENCODING_UTF_16 );
}else
{
sheet=wb.getSheet("Лист69");
}
//----------
//-----------
OutputStream fileOut = new FileOutputStream(Pyt);
wb.write(fileOut);
fileOut.close();
--
View this message in context:
http://www.nabble.com/Images-and-Exel-tp23937543p23937543.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]