Resizing PowerPoint Table in Python To Fit Slide Keeping Aspect Ratio

I create a table and then fill it with content. This sometimes causes the table to exceed the slide boundaries. Is there a way to resize the table to fit the slide boundaries whilst maintaining the current aspect ratio? I’ve tried decreasing the font size, row.minimal_height & column.width whilst in a while loop to constantly decrease this until the table fits but I always end up with a table that doesn’t keep its aspect ratio. Even when I put - table.shape_lock.aspect_ratio_locked = True

@bowespublishing,

Could you please share sample files (input presentation file, if any), output file, etc., along with sample (runnable) code so that we can evaluate your issue on our end? Also, please provide a sample Presentation file in which the table is fitted within the slide boundaries while maintaining its aspect ratio as per your needs. You may create your desired file manually in MS PowerPoint.

PS. please zip the files and other resources before attaching them here.