Problem while splitting table cells in word xml file programatica

S

Shree

Hi,


Originally i have created a table in word like below and saved file as .xml,
1 2 3 4
5 6 7 8 9


and wordML produces the xml structure like,


<w:tbl><w:tblPr><w:tblStyle w:val="TableGrid" />

<w:tblW w:w="0" w:type="auto" /><w:tblLook w:val="01E0" />

</w:tblPr><w:tblGrid>

<w:gridCol w:w="1842" />

<w:gridCol w:w="461" />

<w:gridCol w:w="1381" />

<w:gridCol w:w="922" />

<w:gridCol w:w="921" />

<w:gridCol w:w="1382" />

<w:gridCol w:w="460" />

<w:gridCol w:w="1843" />

</w:tblGrid>

<w:tr wsp:rsidR="00705939" wsp:rsidTr="00497CF4">

<w:tc><w:tcPr><w:tcW w:w="2303" w:type="dxa" /><w:gridSpan w:val="2" />

</w:tcPr><w:p wsp:rsidR="00705939" wsp:rsidRDefault="00705939"
wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="2303" w:type="dxa" /><w:gridSpan w:val="2" />

</w:tcPr><w:p wsp:rsidR="00705939" wsp:rsidRDefault="00705939"
wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="2303" w:type="dxa" /><w:gridSpan w:val="2" />

</w:tcPr><w:p wsp:rsidR="00705939" wsp:rsidRDefault="00705939"
wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="2303" w:type="dxa" /><w:gridSpan w:val="2" />

</w:tcPr><w:p wsp:rsidR="00705939" wsp:rsidRDefault="00705939"
wsp:rsidP="00802D67" />

</w:tc>

</w:tr>


<w:tr wsp:rsidR="00705939" wsp:rsidTr="00175A6F">

<w:tc><w:tcPr><w:tcW w:w="1842" w:type="dxa" />

</w:tcPr><w:p wsp:rsidR="00705939" wsp:rsidRDefault="00705939"
wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="1842" w:type="dxa" /><w:gridSpan w:val="2" />

</w:tcPr><w:p wsp:rsidR="00705939" wsp:rsidRDefault="00705939"
wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="1843" w:type="dxa" /><w:gridSpan w:val="2" />

</w:tcPr><w:p wsp:rsidR="00705939" wsp:rsidRDefault="00705939"
wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="1842" w:type="dxa" /><w:gridSpan w:val="2" />

</w:tcPr><w:p wsp:rsidR="00705939" wsp:rsidRDefault="00705939"
wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="1843" w:type="dxa" />

</w:tcPr><w:p wsp:rsidR="00705939" wsp:rsidRDefault="00705939"
wsp:rsidP="00802D67" />

</w:tc>

</w:tr>

</w:tbl>

Now i wanted to split 5th cell in the above table into 4 cells,so i have
taken width value of 5th cell,its 1842,and devided with 4,and got width as
460 per cell and cloned that cell and copied 4 times and allotted devided
width to all four cloned cells,like below,

<w:tbl><w:tblPr><w:tblStyle w:val="TableGrid" />

<w:tblW w:w="0" w:type="auto" /><w:tblLook w:val="01E0" />

</w:tblPr><w:tblGrid>

<w:gridCol w:w="1842" />

<w:gridCol w:w="461" />

<w:gridCol w:w="1381" />

<w:gridCol w:w="922" />

<w:gridCol w:w="921" />

<w:gridCol w:w="1382" />

<w:gridCol w:w="460" />

<w:gridCol w:w="1843" />

</w:tblGrid>

<w:tr wsp:rsidR="00705939" wsp:rsidTr="00497CF4">

<w:tc><w:tcPr><w:tcW w:w="2303" w:type="dxa" /><w:gridSpan
w:val="2" />

</w:tcPr><w:p wsp:rsidR="00705939"
wsp:rsidRDefault="00705939" wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="2303" w:type="dxa" /><w:gridSpan
w:val="2" />

</w:tcPr><w:p wsp:rsidR="00705939"
wsp:rsidRDefault="00705939" wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="2303" w:type="dxa" /><w:gridSpan
w:val="2" />

</w:tcPr><w:p wsp:rsidR="00705939"
wsp:rsidRDefault="00705939" wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="2303" w:type="dxa" /><w:gridSpan
w:val="2" />

</w:tcPr><w:p wsp:rsidR="00705939"
wsp:rsidRDefault="00705939" wsp:rsidP="00802D67" />

</w:tc>

</w:tr>



<w:tr wsp:rsidR="00705939" wsp:rsidTr="00175A6F">

<w:tc><w:tcPr><w:tcW w:w="460" w:type="dxa" />

</w:tcPr><w:p wsp:rsidR="00705939"
wsp:rsidRDefault="00705939" wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="460" w:type="dxa" />

</w:tcPr><w:p wsp:rsidR="00705939"
wsp:rsidRDefault="00705939" wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="461" w:type="dxa" />

</w:tcPr><w:p wsp:rsidR="00705939"
wsp:rsidRDefault="00705939" wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="461" w:type="dxa" />

</w:tcPr><w:p wsp:rsidR="00705939"
wsp:rsidRDefault="00705939" wsp:rsidP="00802D67" />

</w:tc>



<w:tc><w:tcPr><w:tcW w:w="1842" w:type="dxa" /><w:gridSpan
w:val="2" />

</w:tcPr><w:p wsp:rsidR="00705939"
wsp:rsidRDefault="00705939" wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="1843" w:type="dxa" /><w:gridSpan
w:val="2" />

</w:tcPr><w:p wsp:rsidR="00705939"
wsp:rsidRDefault="00705939" wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="1842" w:type="dxa" /><w:gridSpan
w:val="2" />

</w:tcPr><w:p wsp:rsidR="00705939"
wsp:rsidRDefault="00705939" wsp:rsidP="00802D67" />

</w:tc>

<w:tc><w:tcPr><w:tcW w:w="1843" w:type="dxa" />

</w:tcPr><w:p wsp:rsidR="00705939"
wsp:rsidRDefault="00705939" wsp:rsidP="00802D67" />

</w:tc>

</w:tr>

</w:tbl>

but i am not getting definite structure which splits 5th column formally
instead it is disturbing 1st row's 1st column.
by seeing above example, i dont think cells are splitting with equally
distributed width by splitting its original width value.can you please put
light on this. If you didnt understand my question then please let me know.

Thanks

Shree
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top