我目前正在从事rails项目,该项目处理excel工作表。
我用的是RubyXL。
https://github.com/weshatheleopard/rubyXL
我不知道的是,如何缩小文本,以适应牢房。
我相信这个shrinkToFit

会让它成为可能。
但我不知道怎么称呼它。
有人能帮我吗?
非常感谢你的阅读:)
发布于 2021-12-21 18:03:38
module RubyXL
module CellConvenienceMethods
def change_shrink_to_fix(shrink_to_fit = false)
validate_worksheet
self.style_index = workbook.modify_alignment(self.style_index) { |a| a.shrink_to_fit = shrink_to_fit }
end
end
endhttps://stackoverflow.com/questions/69430047
复制相似问题