axlsx icon indicating copy to clipboard operation
axlsx copied to clipboard

Number Stored as Text

Open sdahlbac opened this issue 8 years ago • 2 comments

Using the following code:

require 'axlsx'

Axlsx::Package.new do |p|
  p.workbook.add_worksheet(name: 'Numbers as text') do |sheet|
    sheet.add_row %w(Number As\ text)
    sheet.add_row([42, 42], types: [nil, :string])
  end
  p.serialize('numbers_as_text.xlsx')
end

At least Excel for Mac 15.33 shows "Number Stored as Text" warning for the second column. For my purpose, the numbers should be stored as text, but I would like to get rid of the warning. Is it possible?

axlsx-2.0.1

sdahlbac avatar May 15 '17 19:05 sdahlbac

@randym Is there a solution for this? I tried playing around with num_fmt and format_code but the warning always appears.

image

vinayverghese avatar Jan 27 '23 06:01 vinayverghese

I am also experiencing this problem.

chaskett avatar Aug 13 '24 02:08 chaskett