Skip to content
hmcgowan edited this page Sep 13, 2010 · 6 revisions

ParseExcel

ADDED FEATURES

Font Support

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)

Sample Code


 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]}"
Clone this wiki locally