Question

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.

Was it helpful?

Solution 3

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.

OTHER TIPS

I have the same issue....But not all reports do it...The Columns have to be manually widened in this output, and the other output to excel allowed for a quick highlight "all columns" with the corner box click and then click once on the column lines and the auto-size, but this one will not. To matters worse it doesn't have this issue in the desktop viewer, it publishes perfectly when I use that Desktop Viewer tool (I do a lot of development offline)

Well i faced the same situation, But found a way to solve my problem. In my case the resulted XSL file has fixed column widths (Eg: 0.2 inches fixed) everytime I generate from tool.

In order to fix this i had to follow these steps (Using MS Word 2010/RTF file)

  1. Select any Cell on the Table in your RTF
  2. MS Word-Ribbon-menu: Select Layout -> Select -> Select Table (this will highlight the table)
  3. Right click the highlighted table and goto "Table Properties"
  4. In Table Properties window goto Column tab and enter "Preferred width" some value
  5. Hit Ok, and Generate the Excel report using BI Tool

if it worked! you are one of the few lucky people in the world who are dealing with BI Publisher issues, then you can set specific column widths one by one (i know.. deal with it)

Note:

In BIP 11g choose Excel (mhtml) instead of Excel (xlsx). You will get xls file, unfortunately you will see a warning message when opening the file in Excel.

I also did a trick of mine: In the table properties (as explained by @JETR NSEF) - In the Table tab, I increased the width of the whole table beyond 100% and it worked (well partially), but the template looks like a mess. It does the trick for me though..

  1. Bring up the .rtf in word.

  2. Load the sample xml.

  3. Then go into view draft.

  4. Drag the table over to the right.

  5. Save, close and open. Doesn't exactly auto fit but it's not all bunched up and ugly.

I have successfully created a RTF template, selected Excel output and set the column width. Before setup, each column is very narrow and cannot read the data; after the setup, each column set the auto width.

The detailed setup is in, https://docs.oracle.com/middleware/12212/bip/BIPRD/GUID-85D87FB9-736E-4503-9259-47DC38B52DEA.htm#BIPRD3013

Look at "Excel 2007 Output Properties" -> "Table Auto Layout"

Regards, Paula

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top