Spread for WinForms allows users to import and export the pattern and gradient fill effects applied to the cells of a worksheet. With extensive support for saving progressive color shades and distinct patterns to an excel file, you can use different fill effects like shadow effect, three-dimensional color effect and reflection effect while working with spreadsheets.
A worksheet with pattern fill and gradient fill applied to the cells is shown in the screenshot shared below.
While importing an excel file with pattern fill or gradient fill effect, the visual appearance will remain intact even when the user is using old cell types (provided the default style settings are not modified). Also, the pattern fill effects and gradient fill effects can be exported without any changes when the worksheet is set to the new flatten style mode.
Further, if you are opening or saving an excel file with the color scale conditional fomatting rule and pattern fill applied to the cells of the worksheet, the specified color will blend with the pattern fill of the cell instead of replacing it. In such a scenario, the background color of the pattern fill is replaced by the color of the color scale rule.
The following limitations should be considered while applying pattern fill and gradient fill effects.
While importing the xlsx file, if the user is using the previous style system, the pattern fill and gradient fill effects won't be displayed. In order to see the pattern and gradient fill effect in the imported xlsx file, you can use the code shown below that enables the flatten style system.
C# |
Copy Code
|
---|---|
// Enable the flatten style system only var fpSpread1 = new FpSpread(LegacyBehavior.All & ~LegacyBehaviors.Style); // Now, import the excel file fpSpread1.OpenExcel("MyExcelFile.xlsx"); |
VB |
Copy Code
|
---|---|
'Enable the flatten style system only Dim fpSpread1 = New FpSpread(LegacyBehavior.All And Not LegacyBehaviors.Style) 'Now, import the excel file fpSpread1.OpenExcel("MyExcelFile.xlsx") |