def xf_biff(style=0)
atr_num = 0
atr_num = 1 if @num_format != 0
atr_fnt = 0
atr_fnt = 1 if @font_index != 0
atr_alc = @text_wrap
atr_bdr = [@bottom,@top,@left,@right].find{ |n| n > 0 } || 0
atr_pat = [@fg_color,@bg_color,@pattern].find{ |n| n > 0 } || 0
atr_prot = 0
@bottom_color = 0 if @bottom == 0
@top_color = 0 if @top == 0
@right_color = 0 if @right == 0
@left_color = 0 if @left == 0
record = 0x00E0
length = 0x0010
align = @text_h_align
align |= @text_wrap << 3
align |= @text_v_align << 4
align |= @text_justlast << 7
align |= @rotation << 8
align |= atr_num << 10
align |= atr_fnt << 11
align |= atr_alc << 12
align |= atr_bdr << 13
align |= atr_pat << 14
align |= atr_prot << 15
if @pattern <= 0x01 and @bg_color != 0x41 and @fg_color == 0x40
@fg_color = @bg_color
@bg_color = 0x40
@pattern = 1
end
if @pattern < 0x01 and @bg_color == 0x41 and @fg_color != 0x40
@bg_color = 0x40
@pattern = 1
end
icv = @fg_color
icv |= @bg_color << 7
fill = @pattern
fill |= @bottom << 6
fill |= @bottom_color << 9
border1 = @top
border1 |= @left << 3
border1 |= @right << 6
border1 |= @top_color << 9
border2 = @left_color
border2 |= @right_color << 7
header = [record,length].pack("vv")
fields = [@font_index,@num_format,style,align,icv,fill,border1,border2]
data = fields.pack("vvvvvvvv")
rv = header + data
return rv
end