Having in the view 'show.xlsx.axlsx':
...
img = Rails.root.join("app/assets/images/demo.jpg").to_s
sheet.add_image(:image_src => img, :noSelect => true, :noMove => true, :hyperlink=>"http://axlsx.blogspot.com") do |image|
image.width=720
image.height=666
image.hyperlink.tooltip = "Labeled Link"
image.start_at 0, 0
end
...
It creates a XLSX-file, which I couldn't open without deleting some components in it. Other content is fine in the created file except the added image.
Could anybody give an example of adding an image to XLSX-file?