【发布时间】:2013-04-09 12:14:49
【问题描述】:
我使用 axlsx gem 来处理 xlsx 文件。 请帮我在工作表的单元格中设置字体。
item_style = s.add_style :b => false, :sz => 9, :font_name => 'courier',
:alignment => { :horizontal => :left, :vertical => :center, :wrap_text => true}
row = sheet.add_row [item.name, item.price], :style => item_style
但单元格中的字体仍然是“Arial”。 我需要任何“单宽”字体。 我知道 'courier' 不是单宽字体,仅以它为例。
因为我有固定的列宽。 我想知道单元格中的文本何时占用 2 行。 设置合适的行高。
谢谢。
【问题讨论】: