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

Can we delete row from existing table from pptx developed by Python-Pptx. #791

Open
VaishnaviDaware opened this issue Feb 18, 2022 · 0 comments

Comments

@VaishnaviDaware
Copy link

Can we delete row from existing table from pptx developed by Python-Pptx.

Screenshot 2022-02-11 150725

I want to delete last 7th row from table. Is there anyway to do it?

And if we have use below function could you please provide any example of code for the same.

def remove_row(table: Table,
row_to_delete: _Row) -> None:
table._tbl.remove(row_to_delete._tr)

OR

def remove_row(table, row):
tbl = table._tbl
tr = row._tr
tbl.remove(tr)

row = table.rows[n]
remove_row(table, row)

Thank you

Originally posted by @VaishnaviDaware in #192 (comment)

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