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

Setting num_format to '0' doesn't apply formatting #103

Closed
brian-pantano opened this Issue Jan 29, 2014 · 3 comments

Comments

2 participants
@brian-pantano

I didn't bother digging into why, but '0' doesn't work as a format when running Worksheet.add_table and specifying format (I didn't try any other way of populating cells). It should be formatted as a number without decimal points, but no formatting is being applied.

A workaround is to use '#0' but '0' should work.

Thanks!

@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Jan 29, 2014

Owner

Hi Brian,

That is the result of a slightly misguided attempt to support number format strings and Excel's built-in format numbers where '0' is 1 and 'General' is 0. o_0

Anyway, it is still a bug and I'll fix it.

In the meantime you can use 1 as the number format or your own workaround.

John

Owner

jmcnamara commented Jan 29, 2014

Hi Brian,

That is the result of a slightly misguided attempt to support number format strings and Excel's built-in format numbers where '0' is 1 and 'General' is 0. o_0

Anyway, it is still a bug and I'll fix it.

In the meantime you can use 1 as the number format or your own workaround.

John

jmcnamara added a commit that referenced this issue Jan 29, 2014

Fix for '0' as a number format string.
Added fix to handle '0' and other number like strings as
number formats. Issue #103.
@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Jan 29, 2014

Owner

Hi Brian,

I've fixed this and push the changes to the master branch.

It should work as expected now.

John

Owner

jmcnamara commented Jan 29, 2014

Hi Brian,

I've fixed this and push the changes to the master branch.

It should work as expected now.

John

@jmcnamara jmcnamara added the fixed label Feb 20, 2014

@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Feb 20, 2014

Owner

This issue is now fixed in version 0.5.3.

Thanks for the input,

John

Owner

jmcnamara commented Feb 20, 2014

This issue is now fixed in version 0.5.3.

Thanks for the input,

John

@jmcnamara jmcnamara closed this Feb 20, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment