The spreadsheet gem isnt documented properly, so I cant understand how can I write hyperlinks using spreadsheet gem. Can anyone tell me?
This script will create a spreadsheet with a link in the first cell
require 'rubygems'
require 'spreadsheet'
book = Spreadsheet::Workbook.new
sheet1 = book.create_worksheet
sheet1[0,0] = Spreadsheet::Link.new 'www.google.com', 'link text'
book.write '/tmp/spreadsheet_with_link.xls'
According to the Guide you have to write to a new file name: https://github.com/zdavatz/spreadsheet/blob/master/GUIDE.md
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With