Open junaid042 opened 9 months ago
@junaid042 Thanks, we'll take a look.
@ElizabethSamuel-MSFT I tested it in Ooxml this is getting main big table second td I want that range xml. when I have not small table inside big table then it is working fine
For now I got range xml that I needed using this
const parser = new DOMParser();
const Doc = parser.parseFromString(openOOXML.value, "application/xml");
// Find the <w:tc> element
const wtc = Doc4.getElementsByTagName("w:tc")[0];
// Extract the full <w:tc> element with its tags
const tcContent = wtc.innerHTML;
// Log the result
console.log(tcContent);
@junaid042 Looks like this could be a bug. Assigning to the product team to investigate.
Hi @junaid042 , May I ask on which platform are you having the issue? Thanks!
desktop
Hi @zhenhuangMSFT this is getting correct range xml but with main table second td. I managed this with some effort but this is a bug.
@junaid042 I test some cases with the code below:
const select = context.document.getSelection(); const ooxml = select.getOoxml(); await context.sync(); console.log(ooxml.value);
I manually select the inner table only, get the ooxml, but the xml still contains the main table second td,
I created a work item(8801858) to track this issue. Any progress we'll sync with you. Thanks again to reach out to us.
In this delete that range is working prefect but when I getOoxml of this then its gives me full table xml I need only xml that range I am deleting
this is my document for quick test Get xml test.docx
this is Script Lab Gist