Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How set column width using mso-... in style sheet ?
Hi,
I have a web page created by a servlet and set its mime type to Excel so it opens in Excel. I am able to tell Excel how to format the data for example by using the following in the style sheet ..mystyle { mso-number-format:"\#\,\#\#0\.000"; } This formats with commas and three decimal places. I would like to automatically reduce the width of each column to the minimum. (Can do this manually by double clicking the line between the column tops, or in VBA using Columns("A:M").EntireColumn.AutoFit ) Is there a mso-... style to do this? Is there a mso- reference anywhere? I have found things like mso-width-source: userset; width=200pt but this does not seem to work and does not do what I want anyway. Many thanks! Stephen Chalkley |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How set column width using mso-... in style sheet ?
Hi Stephen,
There is a style attribute "mso-width-source" which you can set to "auto", but I don't think this will affect how it is displayed in the resulting HTML document. I believe it's only there for round-tripping (telling XL what to do when you open the HTML document in XL again). I guess you could modify the resulting <td tags by taking out the width attributes - that may work for you. -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Stephen Chalkley wrote: Hi, I have a web page created by a servlet and set its mime type to Excel so it opens in Excel. I am able to tell Excel how to format the data for example by using the following in the style sheet .mystyle { mso-number-format:"\#\,\#\#0\.000"; } This formats with commas and three decimal places. I would like to automatically reduce the width of each column to the minimum. (Can do this manually by double clicking the line between the column tops, or in VBA using Columns("A:M").EntireColumn.AutoFit ) Is there a mso-... style to do this? Is there a mso- reference anywhere? I have found things like mso-width-source: userset; width=200pt but this does not seem to work and does not do what I want anyway. Many thanks! Stephen Chalkley |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I change column width in the middle of an Excel sheet? | Excel Discussion (Misc queries) | |||
protect sheet but column width changes | Excel Worksheet Functions | |||
How to retain column width and formulas in copying a sheet | Excel Discussion (Misc queries) | |||
I want to change the column width on a spread sheet? | Excel Worksheet Functions | |||
How do I change sheet notation from R1C1 style to A1 style in XL 2 | Setting up and Configuration of Excel |