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

Blank cells for strings in generated .xlsx file #15

Open
Umair-Munir opened this issue Dec 17, 2014 · 6 comments
Open

Blank cells for strings in generated .xlsx file #15

Umair-Munir opened this issue Dec 17, 2014 · 6 comments

Comments

@Umair-Munir
Copy link

Hi,
when i generate the .xlsx file with xlsx_writer it shows blanks cells for string when i open it with LibreOffice or from google docs xlsx viewer
please help me with this issue...
thanks

@seamusabshere
Copy link
Owner

hi @umairmunir40 would you provide an example .xlsx ?

@Umair-Munir
Copy link
Author

sure...
here is snap shot of example generated file by xlsx_writer. It works fine on microsoft word and shows all columns but
in LibreOffice it shows blank columns for string values.
example

@faelsoto
Copy link

I'm having exactly the same issue. Also, it's not just the strings, but also the dates (and potentially every other data type).

Here's a comparison:

Here's the code:

require 'xlsx_writer'
require 'fileutils'

doc = XlsxWriter.new
sheet1 = doc.add_sheet("People")
sheet1.add_row([
  "DoB",
  "Name",
  "Occupation",
  "Salary",
  "Citations",
  "Average citations per paper"
])
sheet1.add_row([
  Date.parse("July 31, 1912"), 
  "Milton Friedman",
  "Economist / Statistician",
  {:type => :Currency, :value => 10_000},
  500_000,
  0.31
])
::FileUtils.mv doc.path, 'myfile.xlsx'
doc.cleanup

And here's the file: http://ge.tt/7OOoZQM2/v/0

@Dimcha
Copy link

Dimcha commented Sep 30, 2015

@seamusabshere, noticed that there is an open issue already. I have same problem.
Simple example like this:

doc = XlsxWriter.new
doc.quiet_booleans!

sheet = doc.add_sheet("Default")
sheet.add_row ["||||||||||||||||||||||||"]

::FileUtils.mv doc.path, 'test.xlsx'
doc.cleanup

Also I tried an example from readme file same problem. Maybe you know what is the issue and how to fix it? Maybe I just need any parameter or smth?

@faelsoto
Copy link

faelsoto commented Oct 7, 2015

I ended up switching to axlsx

@artyomkalm
Copy link

The same problem, the cells are empty for strings.

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

No branches or pull requests

5 participants