Sha256: b9d214c3b01757e615f7c69a92996486aaafba78858190a7d8f84c10af66a2ab
Contents?: true
Size: 1.12 KB
Versions: 21
Compression:
Stored size: 1.12 KB
Contents
#!/usr/bin/env ruby # -*- coding: utf-8 -*- ############################################################################### # # Example of how to use Excel::Writer::XLSX to write a hyperlink in a # merged cell. # # reverse(c), September 2002, John McNamara, jmcnamara@cpan.org # convert to ruby by Hideo NAKAMURA, cxn03651@msj.biglobe.ne.jp # require 'write_xlsx' # Create a new workbook and add a worksheet workbook = WriteXLSX.new('merge3.xlsx') worksheet = workbook.add_worksheet() # Increase the cell size of the merged cells to highlight the formatting. [3, 6, 7].each { |row| worksheet.set_row(row, 30) } worksheet.set_column('B:D', 20) ############################################################################### # # Example: Merge cells containing a hyperlink using merge_range(). # format = workbook.add_format( :border => 1, :underline => 1, :color => 'blue', :align => 'center', :valign => 'vcenter' ) # Merge 3 cells worksheet.merge_range('B4:D4', 'http://www.perl.com', format) # Merge 3 cells over two rows worksheet.merge_range('B7:D8', 'http://www.perl.com', format) workbook.close
Version data entries
21 entries across 21 versions & 1 rubygems