I’m new to aspose slide. I’m able to generate pptx file using aspose slide product. I’m facing an issue since 1 month of setting table width and position on slide dynamically by code(.NET). I couldn’t found syntax for setting width and positioning through code can you please help me to solve out. If anyone can provide syntax for setting width of table and table cells than that would be great.
As you suggested, I did the same and I am able to achieve my goal. but I don’t want to add table from code. I just want to fetch table from slide and want to change height, width of cells as per the text that I want to add in cell and position of existing table in slide.
e.g. If my cell text is “New” then want to set height,width of cell according to it and if my cell text is “New Accomodation” then want to set height,width of cell accordingly.
Note: I am using Aspose.slides version(v. 15.1.0.0)
I have observed your comments and like to request you to please share with us a sample presentation with your desired results so that I may try to help you out. Also, I would like to request you to please try using Aspose.Slides for .NET 15.6.0 on your end as it is quite improved version as compared to the version which you are using on your side.
I have observed your requirements and worked with the presentation file shared by you. I would like to request you to please try using following sample code with the file I have attached as an input file. The only difference between your file and this attached one is that, to differentiate between two tables, I have added AlternativeText to one table. I have also attached the generated output file for your kind reference.
Presentation pres = new Presentation(@“D:\PPT_Issuetbl.pptx”);
ISlide sld = pres.Slides[0];
for (int j = 0; j < sld.Shapes.Count; j++)
{
IShape shape2 = sld.Shapes[j];
if (shape2.AlternativeText == “now”)
//this if condition is to apply this technique on some specific table in slide
Thanks for the sample code, it works for me. Now I am able to set width of a cell based on text.
Adnan, I have one another query about ppt notes.
I am able to add text in notes of a slide. But when I try to apply style(Italic) to text, It does not take affect. I dont want to apply Italic style to whole notes text. I want partial text of notes should be in italic style and remaining should be in regular style.
I have attached a .pptx file which will give you more clear idea about my issue. Please find attachment.
I have observed that you have made a similar inquiry concerning to notes slide text formatting in a separate thread as well. I have shared my feedback over this thread link. Please share further details with us in shared thread link if there is still an issue incurring on your end.