Hi Mathew,
thanks for the reply,
On Tue, Apr 08, 2014 at 11:49:10AM +0530, Binoy Mathew wrote:
> Hi Ervin,
>
> You can use easyxf (from xlwt) to define your styles for each cells.
>
> ##########
yes, I know, and I'm using that,
> from xlwt import Workbook, XFStyle, Borders, Pattern, Font, easyxf, Formula
>
> # and create a style like below.
>
> self.styleTableLeftColumn = easyxf("""
> font:
> name sansSerif,
> color black,
> bold false,
> height 160;
> borders:
> left thin,
> right 0,
> top 0,
> bottom thin,
> bottom_color light_blue,
> left_color light_blue;
> align:
> wrap on,
> vert centre,
> horiz left;
> """)
all cell's style has the "align: wrap True" attribute, but the
line doesn't wrap.
> # Now you can use this style while writing the contents in the cell -
>
>
> wb = Workbook()
> ws = wb.add_sheet('my sheet')
>
> rowCount = 3
> colCount = 1
> data = 'ksjfhshfdwhsfd hwsfdwefdwefdfhnxnn denwqhed kj uguhgu ku
> ugkuhkhgfdtrdtfgygtfg kuhkuhkuhhhuhg'
note, that I've try your example, and in that the line above also
doesn't wrapped (I've replace the ' separator to """)
but thanks for your help,
a.