Skip to content

Commit 7258490

Browse files
committed
edit the links with slugs
1 parent 8b631c1 commit 7258490

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

knowledge-base/retrieve-cell-color-radspreadprocessing.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,17 @@ ticketid: 1656165
1717

1818
## Description
1919

20-
I have imported an Excel file with some cells formatted with color. Is it possible for me to retrieve the cell color in my program? When the background color is set from MS Excel, my implementation does not retrieve the actual background color.
21-
22-
This KB article also answers the following questions:
23-
- How can I get the background color of a cell in RadSpreadProcessing?
24-
- How to handle cell colors that come from a document theme in RadSpreadProcessing?
25-
- What is the method to extract the actual color value of a cell formatted in Excel through RadSpreadProcessing?
20+
Let's import an Excel file with some cells formatted with color. Learn how to retrieve the cell color when the background color is set from MS Excel.
2621

2722
## Solution
2823

2924
To retrieve the cell color in RadSpreadProcessing, especially when the color is applied through the document theme, follow these steps:
3025

31-
1. Import the Excel document using the appropriate format provider.
32-
2. Access the desired cell or range of cells.
33-
3. Check if the cell's fill is of type `PatternFill`.
34-
4. Retrieve the `ThemableColor` object from the `PatternFill`.
35-
5. Use the `GetActualValue` method of the `ThemableColor` object, passing in the document's theme, to get the actual color value.
26+
1. [Import the Excel document]({%slug radspreadprocessing-formats-and-conversion-xlsx-xlsxformatprovider%}) using the appropriate format provider.
27+
2. [Access the desired cell]({%slug radspreadprocessing-working-with-cells-accessing-cells-of-worksheet%}) or range of cells.
28+
3. Check if the cell's fill is of type [PatternFill](https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/working-with-cells/get-set-clear-properties#fill-property).
29+
4. Retrieve the [ThemableColor]({%slug radspreadprocessing-features-styling-document-themes%}) object from the `PatternFill`.
30+
5. Use the [GetActualValue](https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/styling/document-themes#getting-actual-values) method of the `ThemableColor` object, passing in the document's theme, to get the actual color value.
3631

3732
Here is a sample code snippet demonstrating these steps:
3833

@@ -66,7 +61,7 @@ This approach ensures that even when a cell's color is derived from the document
6661

6762
## See Also
6863

69-
- [Document Themes in RadSpreadProcessing](https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/styling/document-themes)
64+
- [Document Themes in RadSpreadProcessing]({%slug radspreadprocessing-features-styling-document-themes%}})
7065
- [Getting Actual Values](https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/styling/document-themes#getting-actual-values)
7166

7267
---

0 commit comments

Comments
 (0)