Solved

AutoFit Column Widths and AutoFit Row Heights for Excel in XSLT without specifying column definitions

Posted on 2010-09-02
2
1,776 Views
Last Modified: 2013-11-18
Dear Experts,

I need to AutoFit Column Widths and AutoFit Row Heights for Excel in XSLT without specifying column definitions. I am not even sure if this is possible.

Thank you in advance for your time!
0
Comment
Question by:bickes0724
2 Comments
 
LVL 11

Accepted Solution

by:
kmartin7 earned 500 total points
Comment Utility
Unfortunately, this only works with date or numeric values. From the Microsoft reference site:

Attribute: ss:AutoFitWidth
Description: If this attribute is specified as True ("1"), it means that this column should be autosized for numeric and date values only. *We do not autofit textual values*.
If both ss:Width and ss:AutoFitWidth exist, the behavior is as follows:

•ss:AutoFitWidth="1" and ss:Width is unspecified: Autofit the column width to fit the content.
•ss:AutoFitWidth="1" and ss:Width is specified: Set the column to the specified width and only autofit if the size of the content is larger than the specified width.
•ss:AutoFitWidth="0" and ss:Width is unspecified: Use the default column width.
•ss:AutoFitWidth="0" and ss:Width is specified: Use the specified width.  
0
 

Author Comment

by:bickes0724
Comment Utility
If I do not specify columns, is there a way to do this?? I am trying to make the XSLT dynamic and not define columns so that it can be used for all of our form submissions. And also work if we decide to add a field later...
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now