Read text color of a cell #1731
Unanswered
andyparkerson
asked this question in
Q&A
Replies: 1 comment
-
|
You need to explore $excelPackage = Open-ExcelPackage -Path $filePath
$worksheet = $excelPackage.Workbook.Worksheets["Sheet1"]
$Worksheet.Cells[1,1].Style.Font
Name : Calibri
Size : 11
Family : 0
Color : OfficeOpenXml.Style.ExcelColor
Scheme :
Bold : False
Italic : False
Strike : False
UnderLine : False
UnderLineType : None
VerticalAlign : None
$Worksheet.Cells[1,1].Style.Font.color
Theme Tint Rgb Indexed
----- ---- --- -------
0 0
$Worksheet.Cells[1,1].Style.Font.color | gm
TypeName: OfficeOpenXml.Style.ExcelColor
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
LookupColor Method string LookupColor(), string LookupColor(OfficeOpenXml.Style.ExcelColor theColor)
SetColor Method void SetColor(System.Drawing.Color color), void SetColor(int alpha, int red, int green, int blue)
ToString Method string ToString()
Indexed Property int Indexed {get;set;}
Rgb Property string Rgb {get;}
Theme Property string Theme {get;}
Tint Property decimal Tint {get;set;} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to get the existing text color of a cell? I'm dealing with cells that are red or blue, denoting some information, and want to know what color the text is.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions