Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature removal of "columns.add()" and "rows.add()" for tables? #1016

Open
JacobMSager opened this issue Oct 2, 2024 · 0 comments
Open

Feature removal of "columns.add()" and "rows.add()" for tables? #1016

JacobMSager opened this issue Oct 2, 2024 · 0 comments

Comments

@JacobMSager
Copy link

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.

@JacobMSager 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant