-
Notifications
You must be signed in to change notification settings - Fork 8
Home
hmcgowan edited this page Sep 13, 2010
·
6 revisions
The following font attributes are now available in the parser
Field Name | Data Type | Comment |
---|---|---|
:name | string | |
:height | float | Font size, ex: 12.0 |
:bold | string | |
:italic | string | |
:underline | boolean | |
:strikeout | boolean | |
:superscript | boolean | |
:subscript | boolean | |
:color | integer | Excel color (not sure of the mapping) |
require 'parseexcel'
workbook = Spreadsheet::ParseExcel.parse(path_to_file)
worksheet = workbook.worksheet(0)
cell = worksheet.row(0).at(0)
puts "Font Name: #{cell.font[:name]}"
puts "Font Size: #{cell.font[:height]}"
puts "Font Bold?: #{cell.font[:bold]}"