When creating a BI Publisher rdf template in Microsoft Word, with intended output to Microsoft Excel; is there a way to specify that a table should use auto width for the columns in the Excel output.
By default, when you use the BI Publisher Desktop addin for Microsoft Word; the table wizard creates a table in Word that does not result in output to Excel where the columns in Excel is sized to fit the data. Users of the report then have to manually size the excel columns every time they run the report.
I did try "Autofit to Contents" in Microsoft Word, but it didn't work.
Here you go with my workaround: check for the part of your rtf which generates the largest number of columns, let's say the header with address and order info uses only 4 columns, but the order items list uses 10. Now build the whole document as a table with 10 columns and as many rows as needed, including a row for every text line. Fill in text, formulas, and fields into cells but never merge columns, just let it as it is, the text will exceed the cell width but Excel recognizes there's no input in the adjacent cells and displays your text/sentences as if it was a single merged cell, although keeping the most interesting part with tables in the needed cells order. Right click on the table, properties, then select fixed column width ( do your math: 22 is the page width, minus your borders padding right and left, divided by the number of columns, here you have the target column width.. Once done, the Excel fill should be fine.
Solution 2: Build the template in Excel 1997-2003 as xls, I know it's a hell of work adding cell by cell, and the output is limited to xls only, but you can then fix the printable area to fit one page and also fix the columns width in the same way like previously explained. Your output will at least not change to fit the content and let tables look messy. I hope that helps.