Parse images in Excel sheets
masterCreek does not parse images by default to maintain performance. To include image information, you must call the with_images method on the sheet before iterating over rows.
When enabled, cells containing images will return an array of Pathname objects. If an image spans multiple cells, the same Pathname object is returned for each.
If a row contains only images and no text, the standard row iterators might return nil for those cells. In such cases, use the images_at(cell_name) method to retrieve the images directly.
# Preload images
sheet.with_images.rows.each do |row|
puts row # => {"A1"=>[#<Pathname:/path/to/image.jpeg>], "B2"=>"Fluffy"}
end
# Get images for a specific cell
puts sheet.images_at('A1') # => [#<Pathname:/path/to/image.jpeg>]
puts sheet.images_at('C1') # => nil