I have previously used Apache POI to generate XL reports. I am trying to use the POI for generating word reports. I am able to read the word document using HWPFDocument and POIFS input stream. How can I obtain the formating of the paragraph or words. if I have for example, Hello. How can I know that the read word from the document "Hello" is bold.
Thanks,
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
From all Range objects (like Paragraphs) you can obtain a list of CharacterRun objects for that Range - those have style information associated with them.
Thanks for the reply. I was able to get the properties of the CharacterRun/Paragraph. I am having trouble rreading/writing Tables to the word document.
Currently I am using the following code to get the Table, but its throwing an exception
I get the following exception
Can someone please help me to read/write tables and image to the DOC using POI.
Thanks,>
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
Not sure what's happening, but here's some code I used to examine tables which worked fine as I recall.
Hi to all,
Is there any chance to get and set an Tables and Images height ,width and position in a word document(.doc and .docx format) by using POI jar....?
Please suggest possibilities.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
I'm not sure what you mean by "position in a document", but image width and height are available through the org.apache.poi.hwpf.usermodel.Picture class. Curiously, it doesn't seem to have an XWPF equivalent.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.