📜  axlsx 超链接 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:37.880000             🧑  作者: Mango

代码示例1
p = Axlsx::Package.new
book = p.workbook
book.add_worksheet(:name => 'hyperlinks') do |sheet|
  # external references
  sheet.add_row ['axlsx']
  sheet.add_hyperlink :location => 'https://github.com/randym/axlsx', :ref => sheet.rows.first.cells.first
  # internal references
  sheet.add_hyperlink :location => "'Next Sheet'!A1", :ref => 'A2', :target => :sheet
  sheet.add_row ['next sheet']
end