I have observed the part of code snippet shared by you and have not been able to identify whether you are looking for feature in case of PPT or PPTX. Please visit the example shared in this thread link for your convenience.
I am working with PPT (Presentaion). I can set all other fill types but while setting the filltype as SOLID it sets gradient to the ppt. Please let me know whether it's a bug or I need to do that some other way.
I have worked over the requirements shared by you and have generated the following code snippet for setting the cell color. Please share, if I may help you further in this regard.
public static void AddTable()
{
try
{
//Instantiate a Presentation object that represents a PPT file
Presentation pres = new Presentation();
//Accessing a slide using its slide position
Slide slide = pres.getSlideByPosition(1);
//Setting table parameters
int xPosition=880;
int yPosition=1400;
int tableWidth=4000;
int tableHeight=500;
int columns=4;
int rows=4;
float borderWidth=2;
//Adding a new table to the slide using specified table parameters
Actually I was trying to set the cell Background color with setBackColor() method. Can you please tell me the difference between the two methods setForeColor() and setBackColor()?
I like to share that FillFormat class is actually generic class that has been used for fill formats of all shapes in PPT using Aspose.Slides. There may be some shapes that can have different Back and Fore color. But in case of Cell, we have only to set background color of cell and that is set by setForeColor(). Hope, this will answer your question.