View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Stephen Chalkley Stephen Chalkley is offline
external usenet poster
 
Posts: 1
Default 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