require_relative '../lib/fast_excel' workbook = FastExcel.open("example_image.xlsx", constant_memory: false) worksheet = workbook.add_worksheet img_options = Libxlsxwriter::ImageOptions.new img_options[:x_offset] = 0 img_options[:y_offset] = 0 worksheet.insert_image_opt(3, 3, "libxlsxwriter/examples/logo.png", img_options) workbook.close puts "Saved to file example_image.xlsx"