Word file showing one track change for row insertion in table, aspose extracting each cell as one track change

Hi, Team
We have a word document having table data and we added new row in existing table, in document it is showing as one-track change but aspose word extracting each cell as one-track change.

Is it possible to get one tack change same as document.
could you please assist here.

Thanks

Table_Cells_Not_In_One_Track_Change.docx (16.7 KB)

@malleshaitha In MS Word revisions usually are grouped. So to access revisions in the same way as they are represented in MS Word, you can use RevisionGroup. For example see the following code:

Document doc = new Document(@"C:\Temp\in.docx");
foreach (RevisionGroup g in doc.Range.Revisions.Groups)
{
    Console.WriteLine($"{g.Author} - {g.RevisionType}");
}

@alexey.noskov it should be one track change right if revision type showing one in MS Word, but we are getting each cell as individual track change.

@malleshaitha No this is not a single revision, but multiple revisions grouped into one group in MS Word. If you unzip your document you will see revisions are applied to each cell:

<w:tr w:rsidR="00DF23C1" w:rsidRPr="009E78E5" w14:paraId="3C6C44B1" w14:textId="77777777" w:rsidTr="0070157A">
	<w:trPr>
		<w:gridAfter w:val="1"/>
		<w:wAfter w:w="133" w:type="dxa"/>
		<w:ins w:id="0" w:author="Mallesh Aitha" w:date="2024-01-31T13:52:00Z"/>
	</w:trPr>
	<w:tc>
		<w:tcPr>
			<w:tcW w:w="1276" w:type="dxa"/>
			<w:tcBorders>
				<w:bottom w:val="single" w:sz="12" w:space="0" w:color="auto"/>
			</w:tcBorders>
			<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
		</w:tcPr>
		<w:p w14:paraId="3B811FC6" w14:textId="77777777" w:rsidR="00DF23C1" w:rsidRPr="0070157A" w:rsidRDefault="00DF23C1" w:rsidP="0070157A">
			<w:pPr>
				<w:pStyle w:val="BodyText"/>
				<w:spacing w:line="240" w:lineRule="auto"/>
				<w:rPr>
					<w:ins w:id="1" w:author="Mallesh Aitha" w:date="2024-01-31T13:52:00Z"/>
					<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
					<w:sz w:val="20"/>
					<w:szCs w:val="20"/>
				</w:rPr>
			</w:pPr>
			<w:ins w:id="2" w:author="Mallesh Aitha" w:date="2024-01-31T13:52:00Z">
				<w:r w:rsidRPr="0070157A">
					<w:rPr>
						<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
						<w:sz w:val="20"/>
						<w:szCs w:val="20"/>
					</w:rPr>
					<w:t>Dies ist ein weiterer Tabelleneintrag 5</w:t>
				</w:r>
			</w:ins>
		</w:p>
		<w:p w14:paraId="63ACC6BE" w14:textId="77777777" w:rsidR="00DF23C1" w:rsidRDefault="00DF23C1" w:rsidP="0070157A">
			<w:pPr>
				<w:pStyle w:val="TableText"/>
				<w:rPr>
					<w:ins w:id="3" w:author="Mallesh Aitha" w:date="2024-01-31T13:52:00Z"/>
					<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
					<w:sz w:val="20"/>
					<w:lang w:val="de-CH"/>
				</w:rPr>
			</w:pPr>
			<w:ins w:id="4" w:author="Mallesh Aitha" w:date="2024-01-31T13:52:00Z">
				<w:r w:rsidRPr="0070157A">
					<w:rPr>
						<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
						<w:sz w:val="20"/>
					</w:rPr>
					<w:t>Il s’agit d’une autre entrée de tableau 5</w:t>
				</w:r>
			</w:ins>
		</w:p>
	</w:tc>
	<w:tc>
		<w:tcPr>
			<w:tcW w:w="1276" w:type="dxa"/>
			<w:tcBorders>
				<w:bottom w:val="single" w:sz="12" w:space="0" w:color="auto"/>
			</w:tcBorders>
			<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
		</w:tcPr>
		<w:p w14:paraId="765162BA" w14:textId="77777777" w:rsidR="00DF23C1" w:rsidRPr="009E78E5" w:rsidRDefault="00DF23C1" w:rsidP="0070157A">
			<w:pPr>
				<w:pStyle w:val="TableText"/>
				<w:rPr>
					<w:ins w:id="5" w:author="Mallesh Aitha" w:date="2024-01-31T13:52:00Z"/>
					<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
					<w:sz w:val="20"/>
				</w:rPr>
			</w:pPr>
			<w:ins w:id="6" w:author="Mallesh Aitha" w:date="2024-01-31T13:52:00Z">
				<w:r w:rsidRPr="009E78E5">
					<w:rPr>
						<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
						<w:sz w:val="20"/>
					</w:rPr>
					<w:t>5</w:t>
				</w:r>
				<w:r>
					<w:rPr>
						<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
						<w:sz w:val="20"/>
					</w:rPr>
					<w:t>3</w:t>
				</w:r>
				<w:r w:rsidRPr="009E78E5">
					<w:rPr>
						<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
						<w:sz w:val="20"/>
					</w:rPr>
					<w:br/>
					<w:t>(44-67)</w:t>
				</w:r>
			</w:ins>
		</w:p>
	</w:tc>
	<w:tc>
		<w:tcPr>
			<w:tcW w:w="1559" w:type="dxa"/>
			<w:tcBorders>
				<w:left w:val="single" w:sz="4" w:space="0" w:color="auto"/>
				<w:bottom w:val="single" w:sz="12" w:space="0" w:color="auto"/>
			</w:tcBorders>
			<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
		</w:tcPr>
		<w:p w14:paraId="2B457581" w14:textId="77777777" w:rsidR="00DF23C1" w:rsidRPr="009E78E5" w:rsidRDefault="00DF23C1" w:rsidP="0070157A">
			<w:pPr>
				<w:pStyle w:val="TableText"/>
				<w:rPr>
					<w:ins w:id="7" w:author="Mallesh Aitha" w:date="2024-01-31T13:52:00Z"/>
					<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
					<w:sz w:val="20"/>
				</w:rPr>
			</w:pPr>
			<w:ins w:id="8" w:author="Mallesh Aitha" w:date="2024-01-31T13:52:00Z">
				<w:r w:rsidRPr="009E78E5">
					<w:rPr>
						<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
						<w:sz w:val="20"/>
					</w:rPr>
					<w:t>13</w:t>
				</w:r>
				<w:r>
					<w:rPr>
						<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
						<w:sz w:val="20"/>
					</w:rPr>
					<w:t>6</w:t>
				</w:r>
				<w:r w:rsidRPr="009E78E5">
					<w:rPr>
						<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
						<w:sz w:val="20"/>
					</w:rPr>
					<w:br/>
					<w:t>(107-171)</w:t>
				</w:r>
			</w:ins>
		</w:p>
	</w:tc>
	<w:tc>
		<w:tcPr>
			<w:tcW w:w="1559" w:type="dxa"/>
			<w:tcBorders>
				<w:left w:val="single" w:sz="4" w:space="0" w:color="auto"/>
				<w:bottom w:val="single" w:sz="12" w:space="0" w:color="auto"/>
			</w:tcBorders>
			<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
		</w:tcPr>
		<w:p w14:paraId="22B99A20" w14:textId="77777777" w:rsidR="00DF23C1" w:rsidRPr="009E78E5" w:rsidRDefault="00DF23C1" w:rsidP="0070157A">
			<w:pPr>
				<w:pStyle w:val="TableText"/>
				<w:rPr>
					<w:ins w:id="9" w:author="Mallesh Aitha" w:date="2024-01-31T13:52:00Z"/>
					<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
					<w:sz w:val="20"/>
				</w:rPr>
			</w:pPr>
			<w:ins w:id="10" w:author="Mallesh Aitha" w:date="2024-01-31T13:52:00Z">
				<w:r w:rsidRPr="009E78E5">
					<w:rPr>
						<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
						<w:sz w:val="20"/>
					</w:rPr>
					<w:t>21</w:t>
				</w:r>
				<w:r>
					<w:rPr>
						<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
						<w:sz w:val="20"/>
					</w:rPr>
					<w:t>6</w:t>
				</w:r>
				<w:r w:rsidRPr="009E78E5">
					<w:rPr>
						<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
						<w:sz w:val="20"/>
					</w:rPr>
					<w:br/>
					<w:t>(167-277)</w:t>
				</w:r>
			</w:ins>
		</w:p>
	</w:tc>
	<w:tc>
		<w:tcPr>
			<w:tcW w:w="1560" w:type="dxa"/>
			<w:tcBorders>
				<w:left w:val="single" w:sz="4" w:space="0" w:color="auto"/>
				<w:bottom w:val="single" w:sz="12" w:space="0" w:color="auto"/>
			</w:tcBorders>
			<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
		</w:tcPr>
		<w:p w14:paraId="455A834F" w14:textId="77777777" w:rsidR="00DF23C1" w:rsidRPr="009E78E5" w:rsidRDefault="00DF23C1" w:rsidP="0070157A">
			<w:pPr>
				<w:pStyle w:val="TableText"/>
				<w:rPr>
					<w:ins w:id="11" w:author="Mallesh Aitha" w:date="2024-01-31T13:52:00Z"/>
					<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
					<w:sz w:val="20"/>
				</w:rPr>
			</w:pPr>
			<w:ins w:id="12" w:author="Mallesh Aitha" w:date="2024-01-31T13:52:00Z">
				<w:r w:rsidRPr="009E78E5">
					<w:rPr>
						<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
						<w:sz w:val="20"/>
					</w:rPr>
					<w:t>18</w:t>
				</w:r>
				<w:r>
					<w:rPr>
						<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
						<w:sz w:val="20"/>
					</w:rPr>
					<w:t>7</w:t>
				</w:r>
				<w:r w:rsidRPr="009E78E5">
					<w:rPr>
						<w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
						<w:sz w:val="20"/>
					</w:rPr>
					<w:br/>
					<w:t>(148-233)</w:t>
				</w:r>
			</w:ins>
		</w:p>
	</w:tc>
</w:tr>

@alexey.noskov is there a way that we can group these revisions to make it as one trackchange as shown in document.

@malleshaitha In Aspose.Words to access revisions in the same way as they are represented in MS Word, you should use RevisionGroup as suggested above.

@alexey.noskov we were using same logic but each cell getting as revision group.

@malleshaitha I have tested with your document and the code above and there is only one revision group. The output is the following:

Mallesh Aitha - Insertion

I have used the latest 24.1 version of Aspose.Words for testing.