2

I want to get cell background color using OpenXML SDK in c#. Things I have done yet:

WorkbookStylesPart styles = document.WorkbookPart.WorkbookStylesPart;
Stylesheet stylesheet = styles.Stylesheet;
CellFormats cellformats = stylesheet.CellFormats;
//Fonts fonts = stylesheet.Fonts;

CellFormat f = (CellFormat)cellformats.ElementAt((int)cell.StyleIndex.Value);
Fill fill = (Fill)styles.Stylesheet.Fills.ChildElements[(int)f.FillId.Value];
fill.PatternFill.BackgroundColor = ???

what to put in RHS in above statement?

Community
  • 1
  • 1
Dev D
  • 225
  • 1
  • 13

0 Answers0