We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Slides Trial versus Purchased

Hi Aspose Team,

My company currently has a license for an older version of Aspose Slides .NET. We are working on a new project and are considering purchasing an updated license. I’ve been going through the API documentation and producing similar items to the code in the API but noticed a lot of methods are not supported in the version I have.

One instance of this is the AddTables method that takes in 8 arguments instead of the 4. Another being the write feature versus the save feature. Are there things specifically in the trial that have been purposely left out or is your documentation out of date?

Hi Gilbert,

Thanks for your inquiring Aspose.Slides.

I have observed the requirements shared by you. I like to share that we have launched the new merged API and old API is phased out. However all features that were available in old API are supported in new API. The methods for adding tables has been changed for PPT presentations and have been done in accordance with PPTX portion of old API. Please visit this documentation link for your kind reference to add table. Also, the write method has been phased out and now only Save() method is used for saving presentation. Please note that these changes in API are not on trial basis but are persistent. Please visit this documentation portion for your kind reference in this regard about changes made in API.

Please share, if I may help you further in this regard.

Many Thanks,

The methods in which changing cell background colors doesn’t appear as if it’s been changed in the documentation yet the code isn’t working at all for me. Is your API documentation up to date regarding this?

Hi Gilbert,

I have observed your requirement and like to suggest you to please refer to following sample code to set the fill color for table. Please share, if I may help you further in this regard.

private static void setTableFill(ITable table)
{
foreach(IRow row in table.Rows)
{
foreach (ICell cell in row)
{
cell.FillFormat.FillType = FillType.Solid;
cell.FillFormat.SolidFillColor.Color = System.Drawing.Color.Red;

}

}
}

Many Thanks,

Hi,



One last question. In formatting the text inside a cell is it possible to place the text at the bottom left hand side of the cell? Specifically this is needed when cells are much larger then the text inside of it (Like in the Headers).



Please see attached image.

Hi Gilbert,


I have observed the requirement shared by you and like to share that you can set the text position inside the table cell along with its alignment. Please use the following sample code to serve the purpose on your end.

public static void AddTable2()
{

//Instantiate Presentation class that represents PPTX file
using (Presentation pres = new Presentation())
{

//Access first slide
ISlide sld = pres.Slides[0];

//Define columns with widths and rows with heights
double[] dblCols = { 50, 50, 50 };
double[] dblRows = { 50, 30, 30, 30, 30 };

//Add table shape to slide
ITable tbl = sld.Shapes.AddTable(100, 50, dblCols, dblRows);

//Add text to the merged cell
tbl[0, 0].TextFrame.Text = “Merged Cells”;

ICell cell = tbl[0, 0];
cell.TextAnchorType = TextAnchorType.Bottom;
cell.TextFrame.Paragraphs[0].ParagraphFormat.Alignment = TextAlignment.Left;


//Write PPTX to Disk
pres.Save(“table.pptx”, SaveFormat.Pptx);
}
}


Many Thanks,

Thanks for all of your help…



Is it possible for you to point me in the direction of completely removing borders of cells in specifically for c#?



I have set the borders as follows…



cell.BorderTop.FillFormat.FillType = FillType.NoFill;

cell.BorderLeft.FillFormat.FillType = FillType.NoFill;

cell.BorderRight.FillFormat.FillType = FillType.NoFill;

cell.BorderBottom.FillFormat.FillType = FillType.NoFill;



But while the borders don’t exist in the PPTX on screen the minute I go to print preview they show up.

Hi Gilbert,

I have observed your code for removing the table cells border and it seems OK. Please share the complete sample code for generating a presentation where by you are observing the issue of borders appearing in print preview. Please also share the generated presentation as well for reference. I will try my best to help you further in this regard.

Many Thanks,