poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bart Jenkins <bauha...@mac.com>
Subject Re: What is the POI XWPF api call to set a column width to FIXED?
Date Fri, 08 Mar 2013 15:51:54 GMT
Yep.  That's the plan!


On Mar 8, 2013, at 7:10 AM, Nick Burch <apache@gagravarr.org> wrote:

> On Thu, 7 Mar 2013, Bart Jenkins wrote:
>> In Word (version 2010 at least), after one creates a table of n columns, one can
hi-light a column, right-click and select Auto Fit and set the width to FIXED.  The other
2 choices on column widths are:
>> Auto Fit to Contents
>> Auto Fit to Window
>> The one POI API call I'm looking for is the one that will do:
> As no-one has replied with an answer, I'll give you some advice on how you can work it
out for yourself. The main thing to know is that with XWPF, the .docx file format is a zip
file of xml files.
> So, what you'll want to do is create a simple file with a small table, with some dummy
text, and save that. Then, have word change the table as you want, and save that. Next, unzip
both files, and compare the xml.
> From there, you should be able to find out what the xml change is for that. Now, you
can get the low level CT xmlbeans objects from POI, and make those changes. Finally, please
wrap that up in some nice usermodel XWPF code, and submit a patch :)
> Nick
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org

View raw message