Pivot Table AutoFit Questions

K

kiln

The other day, using the Commands and Options dialog, I was able access
the AutoFit checkbox and Column Width settings for many elements of the
pivot table (like Columns). However since then I've not been able to
repeat that; the only pivot region who's AutoFit and Column Width
settings are available is the Pivot Table View. There must be some
sequence that I need to repeat to get access to those other regions but
I cannot find the key. Anyone know how to get in?

While I breifly had access to the column AutoFit property, I was able to
swith AutoFit = False. I then saw the columns shrink to the size needed
by the values presented. I'd have expected the opposite, ie AutoFit =
True would shrink the columns to the needed size. Can anyone explain
this? In any case, I'd also like to be able to change this value via
code. However, I've not been able to find the right code bit to do this
in the useless OWC documntation. Hours of experimentation later, nothing
works.
 
K

kiln

The other day, using the Commands and Options dialog, I was able access
the AutoFit checkbox and Column Width settings for many elements of the
pivot table (like Columns). However since then I've not been able to
repeat that; the only pivot region who's AutoFit and Column Width
settings are available is the Pivot Table View. There must be some
sequence that I need to repeat to get access to those other regions but
I cannot find the key. Anyone know how to get in?

While I breifly had access to the column AutoFit property, I was able to
swith AutoFit = False. I then saw the columns shrink to the size needed
by the values presented. I'd have expected the opposite, ie AutoFit =
True would shrink the columns to the needed size. Can anyone explain
this? In any case, I'd also like to be able to change this value via
code. However, I've not been able to find the right code bit to do this
in the useless OWC documntation. Hours of experimentation later, nothing
works.
Well I found out some of the answers.

Additional access to AutoFit and Col Width settings are available when
the control is populated with data.

Turning off the detail total AutoFit via that interface causes the
Amount total to shrink to an size that fits the data - the reverse of
what AutoFit would seem to be designed to do. An XMLData view of the
result shows a new line:

<x:TotalWidth>60</x:TotalWidth>

However, the following in VBA does not replicate the effect:

pt.ActiveData.DataAxis.Totals(0).Width = 60

Anyone have a clue how I can tap this setting via code?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top