Pivot Table Styling performance

Hi,

I've a VSTO Excel COM Addin where Pivot Tables are primarily used for reporting and in some cases the Pivot Table is enabled for Data Value Edits.

There are some unique styling needs, so styling is done via code (C#).

When the styling needs to be done for more than one intersection, we union all the cells (ranges) and then apply style at once.

There are cases where it is fast, when I take the entire range for a data field and apply style.

In some cases where I have ranges coming from different intersections (they are not continuous range) and it takes a few seconds (like 4 sec).

The number of cells in the range is about 4000. The range is a result of Union of all the collected intersections.

What is the best way to apply styling?

I can't use Conditional formatting because I want to apply style on each cell (intersection) based on a meta-data (maintained in-memory by our Addin application) for the cell.

Appreciate suggestions and help with this topic.

Thanks.

B.M

February 6th, 2015 10:27am

In my view, neither you select all cells first, then apply format, nor apply cells one by one. The apply process is same. The preference issue most probably occur with the select section. You may check the rule code and improve the optimization.
Free Windows Admin Tool Kit Click here and download it now
February 9th, 2015 2:04am

In my view, neither you select all cells first, then apply format, nor apply cells one by one. The apply process is same. The preference issue most probably occur with the select section. You may check the rule code and improve the optimization.
February 9th, 2015 10:02am


Hi,

Just checking in to see if the information was helpful. Please let us know if you would like further assistance.

George Zhao
Forum Support
________________________________________
Come back and mark the replies as answers if they help and unmark them if they provide no help.
If you have any feedback on our support, please click "tnfsl@microsoft.com"
Free Windows Admin Tool Kit Click here and download it now
February 16th, 2015 1:26am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics