Skip to content

text_wrap format is ignored?.. #80

@croshchupkin

Description

@croshchupkin

I am using xlsxwriter 0.5.1 and python 2.7.3.
In a method that returns data for the HTTP response, I did the following:

    out = StringIO.StringIO()
    workbook = xlsxwriter.workbook.Workbook(out)
    worksheet = workbook.add_worksheet()

    header_format = workbook.add_format({'text_wrap': 1, 'valign': 'top'})
    worksheet.write('A1', u'Кол-во Рекламоносителей', header_format)

    # self._write_header(workbook, worksheet)
    # self._write_body(*args)
    # self._write_footer(worksheet)

    workbook.close()
    out.seek(0)
    return out

I also attempted changing

    header_format = workbook.add_format({'text_wrap': 1, 'valign': 'top'})

to:

    header_format.set_text_wrap()
    header_format.set_valign('top')

Unfortunately, all I got was:

snapshot1

As far as I undertood the docs, the row height should have been auto-adjusted, or am I missing something?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions