Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
白塗りの xlsx ファイルを rubyXL で作ろうとしたワイ、無を見る
require "rubyXL"
workbook = RubyXL::Workbook.new
workbook.write("/path/to/blank_nonshironuri.xlsx")
require "rubyXL"
workbook = RubyXL::Workbook.new
worksheet = workbook[0]
shironuri_style_index = workbook.modify_fill(nil, "ffffff")
worksheet.cols << RubyXL::ColumnRange.new(
:min => 1,
:max => 16384, # 0x4000
:style_index => shironuri_style_index,
:width => 9, # 追加した行
)
workbook.write("/path/to/blank_shironuri.xlsx")
require "rubyXL"
workbook = RubyXL::Workbook.new
worksheet = workbook[0]
shironuri_style_index = workbook.modify_fill(nil, "ffffff")
worksheet.cols << RubyXL::ColumnRange.new(
:min => 1,
:max => 16384, # 0x4000
:style_index => shironuri_style_index,
)
workbook.write("/path/to/nil_shironuri.xlsx")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.