It is possible to hide a worksheet. You simply have to define its :state property:
p = Axlsx::Package.new
wb = p.workbook
# Worksheets in the :hidden state can be shown using the sheet formatting
# properties in excel.
wb.add_worksheet name: 'hidden', state: :hidden do |sheet|
sheet.add_row ['you cant see me!']
end
# :very_hidden sheets should be inaccessible to end users.
wb.add_worksheet name: 'very hidden', state: :very_hidden do |sheet|
sheet.add_row ['you really cant see me!']
end
Sources:
https://github.com/randym/axlsx/blob/master/examples/example.rb
https://github.com/randym/axlsx/blob/master/lib/axlsx/workbook/worksheet/worksheet.rb