Home
Analytics
Column width not preserved when BIRT report is exported to excel
birt3
Hi,
I've set table witdth as 100% and tried setting column widths in %,inches,cms, etc. The column width did change in the birt preview but is not preserved when report exported to excel. In excel, all the columns constantly appear to be of same width of 46px, irrespective of what width i set for them in the birt report (.rptdesign file)
How can i make the column width effect in the excel file also?
Can anyone solve this out for me..?
Thanks in advance
Find more posts tagged with
Comments
mwilliams
Hi birt3,
What version of BIRT are you using?
Poumarede
Hi
I have the same thing, the width specified in the layout is not preserved in the generated excel report...
Thanks in avdance for your help
mwilliams
Hi Poumarede,
Are you only using the XLS output? Or are you outputting this report to other formats as well?
ankit29
hi,
same problem is occuring @ my side.i need output in excel format only.can anyone suggest possible solution for the problem..
thanks
ankit
Poumarede
Hello mwilliams<br />
<br />
I want to output this report only to XLS <br />
<br />
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>Hi Poumarede,<br />
<br />
Are you only using the XLS output? Or are you outputting this report to other formats as well?</p></blockquote>
mwilliams
ankit & Poumarede,
If you're only outputting to XLS or HTML, the following solution should work for you. The reason the XLS output scrunches the column sizes down is because it outputs based off the actual set page size. If you have many columns that wouldn't fit in the standard 6" width (8.5" wide standard page with 1.25" left and right columns), the columns are automatically sized to fit in the page. So, if you're just outputting to XLS, you can change the page size by going to the master page tab, then to the general tab of the property editor, then select "custom" as the type and set the height and width to values that will fit your columns. Then, when you export to XLS, your column sizing should still be intact, and Excel will still break the spreadsheet up into the appropriate page sizes for printing.
Hope this helps.
Poumarede
Thank you Michael ! <br />
It seems to work well for me. I had to user absolute width for each column and proceed a little by trial to find the right width at the master page level. But after that it was fine.<br />
<br />
Thanks a lot for you help<br />
<br />
Raphael Poumarède<br />
<br />
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>ankit & Poumarede,<br />
<br />
If you're only outputting to XLS or HTML, the following solution should work for you. The reason the XLS output scrunches the column sizes down is because it outputs based off the actual set page size. If you have many columns that wouldn't fit in the standard 6" width (8.5" wide standard page with 1.25" left and right columns), the columns are automatically sized to fit in the page. So, if you're just outputting to XLS, you can change the page size by going to the master page tab, then to the general tab of the property editor, then select "custom" as the type and set the height and width to values that will fit your columns. Then, when you export to XLS, your column sizing should still be intact, and Excel will still break the spreadsheet up into the appropriate page sizes for printing.<br />
<br />
Hope this helps.</p></blockquote>
mwilliams
Raphael,
Glad I could help. Let us know if you have any other questions. Good luck!
ankit29
Thanks for ur reply..now i am facing a same problem in pdf generation.please suggest for the same..
Regards
ankit
mwilliams
ankit,
What version of BIRT are you using?
MPST
I am unable to give auto height to row in excel report.
I have tried to give AutoFitHeight attribute of excel in rptdesign file as shown bellow:
<row id="250">
<property name="height">0</property>
<property name="AutoFitHeight">1</property>
but when i exported it to excel and open in a text editor, i will get this output:
<Row ss:AutoFitHeight="0" ss:Height="15.0">
<Cell ss:Index="1" ss:StyleID="20" ss:MergeAcross="11">
plz help me how i can set AutoFitHeight attribute.
thanks in advance
dfeiock
Just my 2 cents on this particular issue. I find it pretty limiting that BIRT assumes that you want the data in a printable format when exporting to XLS. I managed to get by with setting the master page size to US Legal and having a landscape orientation. However, as a result I always have to keep the number of columns in mind.
In my particular environment, users typically use XLS, PDF, and HTML for their reporting output. I really wish there were an XLS-RawData output which would not attempt to do any extra formatting on the data.
A similar issue happened to me with crosstabs in an XLS as well. If two crosstabs don't have the same number of columns, cells get merged in such a way that it's nearly impossible for users to write macros to further parse/organize their data.
- DF
mwilliams
Hi DF,<br />
<br />
This is something you could put in as an enhancement at <a class='bbc_url' href='
http://www.birt-exchange.org/bug-reporting/'>Report
Bugs - BIRT Exchange</a>. If you do, be sure to link to the enhancement request in here so that others interested in this issue can vote for your enhancement request.
rafaruiz123
<p>Hi, I am having the same trouble but with XLSX. Does it make a difference?</p>
Jitendragosavi
<p>Hi Birt-Guru,</p>
<p> </p>
<p>I am having trouble while exporting report to excel. I have two grids on one sheet. and have label with different size texts in grid cells. I want all rows from one grid with same size. Currently, Grid first row (header) is in two cells where label in rows are expanded to different sizes.</p>
<p> </p>
<p>How can achieve the desired output ?</p>
sivasubramanian
<p>Hi M Williams,</p>
<p> </p>
<p> I have one query In my report design I'm using grid & inside grid using table's. So while I'm exporting excel format only I want table's alone not for grid So could Please clarify the problem & give me a solution for that issue.</p>