Skip to content

Files

Latest commit

 Cannot retrieve latest commit at this time.

History

History
28 lines (18 loc) · 623 Bytes

comments_example.md

File metadata and controls

28 lines (18 loc) · 623 Bytes

Description

You could add comments (visible or hidden) to the cells.

Code

require 'axlsx'

p = Axlsx::Package.new
wb = p.workbook

wb.add_worksheet(name: 'Comments') do |sheet|
  sheet.add_row ['Can we build it?']
  sheet.add_comment ref: 'A1', author: 'Bob', text: 'Yes We Can!'
  sheet.add_comment ref: 'A2', author: 'Bob', text: 'Yes We Can! - but I dont think  you need to know about it!', visible: false
end

p.serialize 'comments_example.xlsx'

Output

Output

After hovering on the hidden comment:

Output