Find your content:

Search form

You are here

How to ensure that all of the cell content shows in an Excel contenttype page

 
Share

I am exporting a page as Excel page as described here (using contenttype). I am unsure how to ensure that the contents of the cells are showing. After opening the file, I could change it manually, by setting the cell height to Auto-fit and setting the cell contents to wrap, but I would like to do this automatically.

I am guessing there must be a property that can be set in style which is explicitly for Excel which will define these two properties. Perhaps something similar to the mso-number-format property. Note that I am currently using standard html table instead of a apex:pageBlockTable.

If anyone knows anything about this, I would also be grateful if you let me know how you found out about this. I have had difficulty finding documentation around this area.

Edit, I have figured out that white-space: normal; makes excel wrap the text (half of the solution). I just need to figure out the automatic height now.


Attribution to: lindon fox

Possible Suggestion/Solution #1

There are two parts to the question. The first is to wrap the cell contents:

white-space: normal;

The second part was because I had tried to set the height of the cell manually. Together with the first part, if there is no height property set, then the height becomes automatic.


Attribution to: lindon fox
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/34046

My Block Status

My Block Content