Home
Analytics
How to autofit content of column cell in excel table
qwerradi
I'm using the Java BIRT API to design BIRT reports. As output formats I'm using html and xls but I have a problem when I export the data(in form of tables) to Excel. The problem is that the width of the excel cells doesn't change in order to display the whole string (if the string is larger than the defualt cell width).
E.g. If I have this string aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, in excel I see aaaaa and have to stretch the cells manually.
When I use html as output format and the BIRT Report Viewer everything looks fine but the table in excel looks really awful.
Could anyone tell me if there is a property which I can specify for autofitting excel cells?
Find more posts tagged with
Comments
kclark
<a class='bbc_url' href='
https://bitbucket.org/yaytay/spudsoft-birt-excel-emitters/wiki/Home'>Take
a look at this</a> emitter by yaytay. I think it autofits the cells when exporting to Excel.
Yaytay
<blockquote class='ipsBlockquote' data-author="'kclark'" data-cid="117513" data-time="1370894616" data-date="10 June 2013 - 01:03 PM"><p>
<a class='bbc_url' href='
https://bitbucket.org/yaytay/spudsoft-birt-excel-emitters/wiki/Home'>Take
a look at this</a> emitter by yaytay. I think it autofits the cells when exporting to Excel.<br /></p></blockquote>
My emitter (the SpudSoft emitter) automatically increase columns widths to fit as long as there isn't a specific width set on the column (so if it doesn't work, look at the XML for the report design and check there there is no width specified for the column).<br />
Also note that the emitter usually ignores the header rows on a table (there's an option to force them to be considered).<br />
<br />
Jim
qwerradi
Ok, thanks! I'll try the SpudSoft emitter.
qwerradi
<blockquote class='ipsBlockquote' data-author="'Yaytay'" data-cid="117514" data-time="1370900454" data-date="10 June 2013 - 02:40 PM"><p>
My emitter (the SpudSoft emitter) automatically increase columns widths to fit as long as there isn't a specific width set on the column (so if it doesn't work, look at the XML for the report design and check there there is no width specified for the column).<br />
Also note that the emitter usually ignores the header rows on a table (there's an option to force them to be considered).<br />
<br />
Jim<br /></p></blockquote>
<br />
<br />
Could you tell me please what's the option to force the header rows on a table and the table title to be considered? And I also wanted to know if the jars are uploaded to the maven central repository because I can't download them via maven, only manually? ^_^