I am assuming that you have created a file using Word then opened it and re-saved it using POI and are wondering why the file sizes are different.
If that is the case then you should not be surprised because it is quite lilely that the structure of the files will be slightly different. The two applications whilst creating files that both can read may go about the process slightly differently - Word for example may exclude certain information because it can make assumptions about issing/excluded information when reading that same file. POI cannot because - at least until recently - the full details of the file structure were not public and outside of Microsoft no one really knows how Word parses the files it creates. --- On Tue, 12/2/08, Calimero <[EMAIL PROTECTED]> wrote: From: Calimero <[EMAIL PROTECTED]> Subject: Re: Bug inserting text in Word file To: [email protected] Date: Tuesday, December 2, 2008, 3:27 AM Well, it can delete cells of table, doesn't open in MSOffice. I noted that inserting text number of bytes have changed. Any idea ? Ulf Dittmer-2 wrote: > > What do you mean by "document is altered"? Inserting > text is altering the document, isn't it? > > Also, you aren't really ignoring the exception, right? > > Ulf > > --- Calimero <[EMAIL PROTECTED]> wrote: > >> >> Hi, >> >> i try to insert text in Word file like that. >> Document is altered when it >> contains tables / images or graphics : >> >> try { >> HWPFDocument doc = new HWPFDocument(is); >> >> Range range = doc.getRange(); >> range.insertBefore("Hello world"); >> doc.write(outputStream); >> } catch(Exception e){} > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/HELP-PLEASE-%3A-Bug-inserting-text-in-Word-file-tp20789913p20790326.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]
