Created
October 15, 2018 10:02
-
-
Save kkuprikov/b4abd8785295341287f99f29e3e90c75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'axlsx' | |
package = Axlsx::Package.new | |
package.workbook do |workbook| | |
workbook.add_worksheet name: 'merged_cells' do |sheet| | |
sheet.add_row %w(a b c d e f g) | |
sheet.add_row %w(b c d x y z z) | |
sheet.merge_cells "A1:A2" | |
sheet.merge_cells "B1:B2" | |
end | |
end | |
package.serialize 'merged_cells.xlsx' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment