Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: James Silberbauer
RE: combining alignments [ reply ]  
2008-03-12 17:34
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

By: Linda Julien
combining alignments [ reply ]  
2008-01-31 22:03
The documentation assures me that "Vertical and horizontal alignments can be combined"...but what's the syntax?

Thanks!
Linda