Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional quotation symbol is added to cells with text that is number #36

Open
romanoff opened this issue Sep 27, 2019 · 3 comments
Open
Labels

Comments

@romanoff
Copy link

romanoff commented Sep 27, 2019

I have tried couple of ruby libraries (this one and https://github.com/Paxa/fast_excel ) and when I am just trying to create cell with text that has numeric value:

Xlsxtream::Workbook.open('my_data.xlsx') do |xlsx|
  xlsx.write_worksheet 'Sheet1' do |sheet|
    # Boolean, Date, Time, DateTime and Numeric are properly mapped
    sheet << ["2019"]
  end
end

when I open my_data.xlsx then 2019 cell is shown with '2019 value, not just 2019. Is there a way to change that? (didn't have a chance to use Excel for now, only used LibreOffice 5 and 6)

@felixbuenemann
Copy link
Owner

Why are you assigning a text when you want a numeric value?

@felixbuenemann
Copy link
Owner

felixbuenemann commented Sep 27, 2019

Btw. if you have no control over the data types in the column values, you could pass the auto_format: true option to write_worksheet to enable data type guessing from text.

@sandstrom
Copy link
Contributor

sandstrom commented Jun 2, 2021

Is this an issue with the code itself, or a general question? For general questions Stackoverflow or Github Discussions (if one is setup for this repo) is better than Github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants