Tworzenie dokumentu Excel z OpenXml sdk 2.0
Stworzyłem dokument Excel przy użyciu OpenXml SDK 2.0, teraz muszę go stylizować, ale nie mogę.
Nie wiem, jak pomalować kolor tła lub zmienić rozmiar czcionki w różnych komórkach.
Mój kod do utworzenia komórki to:
<code>private static Cell CreateTextCell(string header, string text, UInt32Value index) { Cell c = new Cell(); c.DataType = CellValues.InlineString; c.CellReference = header + index; InlineString inlineString = new InlineString(); DocumentFormat.OpenXml.Spreadsheet.Text t = new DocumentFormat.OpenXml.Spreadsheet.Text(); t.Text = text; inlineString.AppendChild(t); c.AppendChild(inlineString); return c; } </code>