Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Wed Apr 03, 2024 6:40 pm

hi
how could i add my own color to table's cells background?
regards

XxLonely
 
Posts: 19
Joined: Sat Mar 30, 2024 5:11 pm

Thu Apr 04, 2024 4:50 am

Hi,

Thanks for your inquiry.
Our Spire.Doc provides the following method to set the background color for cells.
Code: Select all
# Set the background color of a cell to custom RGB
cell.CellFormat.BackColor = Color.FromRgb(255,100,150)

# Set the background color of a cell to a predefined color
cell.CellFormat.BackColor = Color.get_Yellow()

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1187
Joined: Tue Sep 27, 2016 1:06 am

Thu Apr 04, 2024 1:36 pm

thank you very much

XxLonely
 
Posts: 19
Joined: Sat Mar 30, 2024 5:11 pm

Return to Spire.Doc