Hi! I'm trying to delete all text from the cells of a table. The table in this case has horizontal and vertical merged cells. This works correctly with a PPTX created from Powerpoint. But when trying the same with a PPTX created from Google Slides, I get the following error:
TypeError: Cannot read properties of undefined (reading 'getAttribute')
at XmlElements.textRangeProps (/app/node_modules/pptx-automizer/src/helper/xml-elements.ts:63:41)
at XmlElements.text (/app/node_modules/pptx-automizer/src/helper/xml-elements.ts:31:24)
at ModifyXmlHelper.createElement (/app/node_modules/pptx-automizer/src/helper/modify-xml-helper.ts:111:33)
at ModifyXmlHelper.assertElement (/app/node_modules/pptx-automizer/src/helper/modify-xml-helper.ts:85:14)
at ModifyXmlHelper.modify (/app/node_modules/pptx-automizer/src/helper/modify-xml-helper.ts:38:28)
at ModifyXmlHelper.modify (/app/node_modules/pptx-automizer/src/helper/modify-xml-helper.ts:59:16)
at ModifyXmlHelper.modify (/app/node_modules/pptx-automizer/src/helper/modify-xml-helper.ts:59:16)
at /app/node_modules/pptx-automizer/src/modify/modify-table.ts:36:20
at Array.forEach (<anonymous>)
at /app/node_modules/pptx-automizer/src/modify/modify-table.ts:34:18
I think this issue happens for Google Slides because, the <a:tc> when it's merged, it doesn't have any <a:txBody> when compared to a PPTX from Powerpoint.
Is there maybe a way to, when modifying text, skip some cells from being changed? Currently I modify the text doing something like this:
Hi! I'm trying to delete all text from the cells of a table. The table in this case has horizontal and vertical merged cells. This works correctly with a PPTX created from Powerpoint. But when trying the same with a PPTX created from Google Slides, I get the following error:
This is the PPTX that I've been using for testing: GS_Tables_Merged.pptx
I think this issue happens for Google Slides because, the
<a:tc>
when it's merged, it doesn't have any<a:txBody>
when compared to a PPTX from Powerpoint.Is there maybe a way to, when modifying text, skip some cells from being changed? Currently I modify the text doing something like this:
Thanks!