Skip to content

Column widths in MS Word #360

@savaskoc

Description

@savaskoc

Hi,

I have following table in my document;

    table = self.add_table(rows=len(array), cols=4)
    table.columns[0].width = Cm(3)
    table.columns[1].width = Cm(11)
    table.columns[2].width = Cm(3)
    table.columns[3].width = Cm(3)

    for i, x in enumerate(array):
        table.cell(i, 0).text = 'Foo'
        table.cell(i, 1).text = 'Foo'
        table.cell(i, 2).text = 'Foo'
        table.cell(i, 2).paragraphs[0].paragraph_format.alignment = WD_ALIGN_PARAGRAPH.RIGHT
        table.cell(i, 3).text = 'Foo'
        table.cell(i, 3).paragraphs[0].paragraph_format.alignment = WD_ALIGN_PARAGRAPH.RIGHT

If I open the document in Apple Pages, all column widths are correct but not on MS Word. Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions