After trying to get :align => top to work, I've managed this by creating a format like:
format_centre_top = workbook.add_format(:text_h_align => 2, :text_v_align => 0)
and then:
worksheet.write(0, 0, 'text', format_centre_top)
...which aligns centre and top.
The horizontal codes are:
left = 1
centre = 2
right = 3
fill = 4
justify = 5
merge = 6
and the vertical codes are:
top = 0
vcentre = 1
bottom = 2
vjustify = 3
I haven't tried any other combinations, but I guess it should work.
James
|