By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,451 Members | 1,657 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,451 IT Pros & Developers. It's quick & easy.

Python dataframe write into specific existing excel file

P: 1
Trying to write dataframe into existing excel file to a specific column without deleting existing data. Code sample:
Expand|Select|Wrap|Line Numbers
  1. import pandas
  3. from openpyxl import load_workbook
  5. writer = pd.ExcelWriter('test.xlsx', engine='xlsxwriter')
  7. df.to_excel(writer, sheet_name='sheet1', startrow=1, startcol=57, index=False, engine='openpyx1')
Jun 8 '16 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 626
"pd" & "df" have not been declared, if that is what you are asking about.
Jun 8 '16 #2

Post your reply

Sign in to post your reply or Sign up for a free account.