Sha256: f59805a22a196c647b913a137de5ffe71f0494bf199dc38788050200eeb4ed28

Contents?: true

Size: 669 Bytes

Versions: 4

Compression:

Stored size: 669 Bytes

Contents

require_relative '../lib/fast_excel'

workbook = FastExcel.open("example_hyperlink.xlsx", constant_memory: false)
worksheet = workbook.add_worksheet
worksheet.auto_width = true

url_format = workbook.add_format(underline: :underline_single, font_color: :blue)

worksheet.append_row([
  "Ultra Fast Excel Writer for Ruby",
  FastExcel::URL.new("https://github.com/Paxa/fast_excel"),
  FastExcel::URL.new("postgres://localhost")
], [nil, url_format])

# Same as:
#   worksheet.write_value(0, 0, "Ultra Fast Excel Writer for Ruby")
#   worksheet.write_url(0, 1, "https://github.com/Paxa/fast_excel", url_format)

workbook.close
puts "Saved to file example_hyperlink.xlsx"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fast_excel-0.5.0 examples/example_hyperlink.rb
fast_excel-0.4.1 examples/example_hyperlink.rb
fast_excel-0.4.0 examples/example_hyperlink.rb
fast_excel-0.3.0 examples/example_hyperlink.rb