EvotecIT / OfficeIMO

Fast and easy to use cross-platform .NET library that creates or modifies Microsoft Word (DocX) and later also Excel (XLSX) files without installing any software. Library is based on Open XML SDK
MIT License
289 stars 50 forks source link

How do I set the first column style of a table not to be bold #235

Closed taoranxy closed 4 months ago

taoranxy commented 4 months ago

WordTable is set unbolded. I want WordTableStyle to be selected so that the first column of the non-first row is unbolded, but only one of the WordTableStyle enumerations can do that. i set the value according to the example (wordTable.Rows[i].Cells[j].Paragraphs[0].Bold = false), image image

but it does not take effect when exported, and the text in the first column of the non-first row is still Bold, whereas if I set bold for all Paragraphs in all Cells = true, all the text in the cell is bolded when exporting, can you tell me how to set it? image ![Uploading image.png…]()

PrzemyslawKlys commented 4 months ago

I think it's related to Conditional Formatting:

wordTable.ConditionalFormattingFirstRow = true;
wordTable.ConditionalFormattingLastRow = true;
wordTable.ConditionalFormattingFirstColumn = false;

Does it work?

taoranxy commented 4 months ago

Thank you so much for your help. I did it