poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JSimas <jsi...@gmail.com>
Subject Problems reading and writing doc files in POI 3.6
Date Mon, 25 Jan 2010 17:15:50 GMT

Hello everyone.

I already posted this problem regarding the 3.5 version of poi:
http://old.nabble.com/Problems-reading-and-writing-doc-files-in-POI-3.5-td26025879.html#a26025879

Because no one answered me, i went to the bug tracker:
https://issues.apache.org/bugzilla/show_bug.cgi?id=48065

Once again no answer.

I've just downloaded version 3.6 of poi, tried again, and still having same
error. 

Here is the code i'm using

        public static void main(String[] args) {
		try {
			File file = new File("c:\\input.doc");
			HWPFDocument document = new HWPFDocument(new FileInputStream(file));
			File outputFile = new File("c:\\output.doc");
			FileOutputStream outStream = new FileOutputStream(outputFile);
			try {
				document.write(outStream);
			} finally {
				outStream.close();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

See the input.doc and output.doc to see what is my problem.
http://old.nabble.com/file/p27307995/input.doc input.doc 
http://old.nabble.com/file/p27307995/output.doc output.doc 

Please help me! This is a very basic error. Maybe i'm doing something very
wrong... but if not... this is a major problem in the new versions of POI
(in version 3.2 this code works fine).

Thanks in advance.

Best regards.

João Simas
-- 
View this message in context: http://old.nabble.com/Problems-reading-and-writing-doc-files-in-POI-3.6-tp27307995p27307995.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message