You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using Python-PPTX 0.6.23 for a script that converts excel spreadsheets into PowerPoint tables, with a row and column count that varies depending on the input. Up until this point I've been creating a table object, and then adding rows and columns to the table using "table.columns.add()" or "table.rows.add()" procedurally as the script determines based on how many cell rows or cell columns are in the excel sheet. Unfortunately, that method is no longer viable as of Python-PPTX v1.0.0, for reasons I'm not clear on. Every time I run "table.columns.add()" or "table.rows.add()" I receive the error "'_ColumnCollection' object has no attribute 'add'" or "'_RowCollection' object has no attribute 'add'". This was never an issue in v0.6.23.
Of course, I COULD just run a check for how many columns and rows I need before I create the table and it would work fine, but I'm just confused as to why this feature was removed in the first place. What was the cause for this change? Was that feature erroneously removed? The feature still exists in Microsoft's PowerPoint API per: https://learn.microsoft.com/en-us/previous-versions/office/developer/office-2010/ff745415(v=office.14). Was the Python-PPTX syntax changed for this feature and I'm just not looking in the right place in the docs? Thank you in advance for your time.
The text was updated successfully, but these errors were encountered:
JacobMSager
changed the title
Deprecation of "columns.add()" and "rows.add()" for tables
Feature removal of "columns.add()" and "rows.add()" for tables?
Oct 2, 2024
Hello,
I've been using Python-PPTX 0.6.23 for a script that converts excel spreadsheets into PowerPoint tables, with a row and column count that varies depending on the input. Up until this point I've been creating a table object, and then adding rows and columns to the table using "table.columns.add()" or "table.rows.add()" procedurally as the script determines based on how many cell rows or cell columns are in the excel sheet. Unfortunately, that method is no longer viable as of Python-PPTX v1.0.0, for reasons I'm not clear on. Every time I run "table.columns.add()" or "table.rows.add()" I receive the error "'_ColumnCollection' object has no attribute 'add'" or "'_RowCollection' object has no attribute 'add'". This was never an issue in v0.6.23.
Of course, I COULD just run a check for how many columns and rows I need before I create the table and it would work fine, but I'm just confused as to why this feature was removed in the first place. What was the cause for this change? Was that feature erroneously removed? The feature still exists in Microsoft's PowerPoint API per: https://learn.microsoft.com/en-us/previous-versions/office/developer/office-2010/ff745415(v=office.14). Was the Python-PPTX syntax changed for this feature and I'm just not looking in the right place in the docs? Thank you in advance for your time.
The text was updated successfully, but these errors were encountered: