do we have any function to say if an object is a table just like has_table in python pptx?
Thank you for contacting support. I am working on the question and will get back to you as soon as possible.
You can use the standard Python
isinstance function to check if a PowerPoint object is a table, as follows:
import aspose.slides as slides with slides.Presentation("sample.pptx") as presentation: first_slide = presentation.slides # Search for a table on the first slide. for shape in first_slide.shapes: if isinstance(shape, slides.Table): print("The table has been found.")
Thanks so much Andrey, it helps.
Another question, how to identify different auto shapes(such as textbox, rectangle, oval etc)? I know type gives you the type as “AutoShape” for all of them but I want a function(just like you shared the above solution) to distinguish all of them separately.
Thank you for using Aspose.Slides.
Thanks Mumtaz, it really helps