We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Table Width Question


I am observing some oddities that can’t be explained with the CellFormat.getWidth() api. Any help to explain what is going on would be very appreciated.

I am attaching some sample code in a text file. I am also including a table that I ran the program against.

Here is the output from my program:

Cell #1; Width: 33.1 (pointers)
Cell #2; Width: 23.05 (pointers)
Cell #3; Width: 104.65 (pointers)
Cell #4; Width: 29.7 (pointers)
Cell #5; Width: 26.55 (pointers)
Cell #6; Width: 45.4 (pointers)
Cell #7; Width: 39.1 (pointers)
Cell #8; Width: 87.5 (pointers)
Cell #9; Width: 89.75 (pointers)
LeftMostCellForRow 1; Position From Left Of Page: 72 (points)
Row #1; Width: 478.8 (pointers)
Cell #1; Width: 269.35 (pointers)
Cell #2; Width: 209.05 (pointers)
LeftMostCellForRow 2; Position From Left Of Page: 72 (points)
Row #2; Width: 478.4 (pointers)

Of particular interest, you will see that the two rows are a different width. Why is this? I do not understand. The rows should be the exactly the same size, but according to getWidth() they are slightly different.


Hi Chase,

Thanks for your inquiry. I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-12242. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hey Tahir,

Thank you! I was wondering in the mean time if you had any idea as to how far off these values may become? Will it just be a fraction of a point?? Knowing this would help me to develop a potential way to detect this situation as a short-term workaround.

Perhaps it would only be a small fraction with a predictable upper boundary? If that is the case, it would be good to know. If there is no upper boundary, then I must wait.



I am looking into the word document in an extremely zoomed in position and it is the case that the rows are indented slightly differently with respect to one another. Therefore, I do not believe we have a defect.

Sorry for any confusion. Please see me screenshot…

Hi Chase,

Thanks for your feedback. Yes, from the shared detail it is not a bug. I have closed WORDSNET-12242 issue as ‘Not a bug’.

note that a table in MS Word is a set of independent rows. Each row has
a set of cells independent on cells of other rows. So there is no
logical “column” in a MS Word’s table. “The 1st column” is something
like “a set of the 1st cells of each row in a table”.

example, it’s possible to have a table where the 1st row consists of
two cells: 2cm and 1cm and the 2nd row consists of different two cells:
1cm and 2cm of width.