Excel conditional formatting not updating
This article illustrates how to use the Microsoft Excel 12.0 Object Library to programmatically set conditional formatting on a range of cells using color scales and icon sets.
Although we have arrived at a solution that means the user of the file will be unaware of the issue described it still leaves the question open as to why Excel in particular 2010 versions cannot complete the process of formatting the sheet correctly, using conditional formatting, that earlier versions can. Oha nd I did have the problem above as well - will try your solution, thanks, but forcing a screen update after every change might affect my VBA code, Think I can modify it with a global variable though ;)Hi Steve A new development.
For Example, let us look at the monthly sales data for a bookstore chain.
The bookstore organizes their sales data as follows: We will apply conditional formatting so that we can easily determine if the department at the local branch is doing better or worse as compared to the other branches in the company.
Using The following block of code fills cells A1: A10 with sample data and then applies conditional formatting to the data using a two-color color scale.
The Visual Basic version of the code uses the built-in RGB function to generate the color values for the minimum and maximum threshold values, whereas the C# version uses hard-coded values for these settings. In COM, colors are represented as an integer in the 00BBGGRR format. Because the object model for Excel 2007 is COM-based, the method does not work because the bytes for the color's red and blue components are swapped. Save As(param Workbook Path, param Missing, param Missing, param Missing, param Missing, param Missing, Xl Save As Access No Change, param Missing, param Missing, param Missing, param Missing, param Missing); Conditional formatting makes it simple to highlight specific values or to identify values in a range.