0

While exporting the EXCEL file using Ruby or Rails, I faced something that needs to be disabled the Autocomplate for cell values. Is there any solution for it?

require 'rubyXL'

workbook = RubyXL::Workbook.new
worksheet = workbook.add_worksheet

no_autofill_style = workbook.styles.add(autoComplete: 'off')

worksheet.sheet_data.rows.each do |row|
  row.cells.each do |cell|
    cell.styleIndex = no_autofill_style 
  end
end

I have tried like this but failed to add styles into workbook

mechnicov
  • 12,025
  • 4
  • 33
  • 56
  • If you do the formatting in Excel, and then load this into Ruby, what style value does Ruby it print? – pts Aug 31 '23 at 13:59

0 Answers0