blob: 3aa2e877c8469df37ac5f3b4d67048cbd83142fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
## Description
You could add comments (visible or hidden) to the cells.
## Code
```ruby
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

After hovering on the hidden comment:

|