We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The xlsxwriter engine (which I helped implement) erroneously adds a default General format to cells that don't require it.
xlsxwriter
General
This doesn't affect spreadsheets created with to_excel(). However, it does prevent the user from overwriting the cell format with a column format.
to_excel()
For example consider the following program:
import pandas as pd from pandas import ExcelWriter df = pd.DataFrame([[123456, 123456], [987654, 987654]], columns=['First', 'Second']) writer = ExcelWriter('test.xlsx', engine='xlsxwriter') df.to_excel(writer) workbook = writer.book worksheet = writer.book.worksheets()[0] # Add a column format. myformat = workbook.add_format({'num_format': '#,##0'}) worksheet.set_column(1, 1, None, myformat) writer.save()
The gives the following output:
However, it should look like this (note the format in the B column cells):
I'll submit a PR to fix this as soon as I get a working test.
Versions:
INSTALLED VERSIONS ------------------ commit: 4aa0e0a674a0823b5a81944f087e744f27c4e21d python: 2.7.2.final.0 python-bits: 64 OS: Darwin OS-release: 14.0.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_IE.UTF-8 pandas: 0.15.2-50-g4aa0e0a nose: 1.3.0 Cython: 0.19.1 numpy: 1.7.1 scipy: None statsmodels: None IPython: 1.1.0 sphinx: 1.2b3 patsy: None dateutil: 2.2 pytz: 2013b bottleneck: None tables: None numexpr: None matplotlib: 1.4.x openpyxl: 2.0.2 xlrd: 0.9.3 xlwt: 0.7.5 xlsxwriter: 0.6.4 lxml: 3.2.3 bs4: None html5lib: 1.0b3 httplib2: None apiclient: None rpy2: None sqlalchemy: None pymysql: None psycopg2: None
The text was updated successfully, but these errors were encountered:
07a5735
Successfully merging a pull request may close this issue.
The
xlsxwriter
engine (which I helped implement) erroneously adds a defaultGeneral
format to cells that don't require it.This doesn't affect spreadsheets created with
to_excel()
. However, it does prevent the user from overwriting the cell format with a column format.For example consider the following program:
The gives the following output:
However, it should look like this (note the format in the B column cells):
I'll submit a PR to fix this as soon as I get a working test.
Versions:
The text was updated successfully, but these errors were encountered: