I am trying to create a simple table with multiple cells and use yellow as the background color. below is my code snippet, when I pass in 2 strings, this piece of code should create a table with 2 cells in the same row, and set the background color of both cells to yellow, but when I output to a file, only first cell is in yellow, the second cell is still white, any clue why this is happening? I’ve attached my screenshot.
Hi
Thanks for your request. When you clear formatting before closing the table, DocumentBuilder clears the formatting of the current cell. This causes the problem. So you have to clear the formatting when you moved outside the cell, i.e. after closing the table.
Best regards,
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.