weshatheleopard / rubyXL

Ruby lib for reading/writing/modifying .xlsx and .xlsm files
MIT License
1.28k stars 255 forks source link

Hidden columns after change_column_font_name #383

Open rasaffie opened 4 years ago

rasaffie commented 4 years ago

There is a problem with change_column_font_name on version 3.4.15. With code:

workbook = RubyXL::Workbook.new()
sheet = workbook.worksheets[0]
headers = ['A', 'B', 'C']
headers.each_with_index do |header, index|
  sheet.add_cell(0, index, header)
  sheet.change_column_font_name(index, 'Calibri')
end
workbook.stream.string

columns end up hidden (the worksheet starts at column D) when I open it using Excel version 16.42 on macOS 10.15.7. But if I use change_row_font_name there is no problem.

EDIT: Might be related to https://github.com/weshatheleopard/rubyXL/issues/336