1

I tried to come up with a way to copy data from a sheet in an excel file as

import pandas as pd

origionalFile = pd.ExcelFile('AnnualReport-V5.0.xlsx')
Transfers = pd.read_excel(origionalFile, 'Sheet1')

I have another excel file, which named 'AnnualReport-V6.0.xlsx', it has existing data in the sheet named 'Transfers', I tried to use the dataframe I created easily on to replace data in the sheet 'Transfers' in 'AnnualReport-V6.0.xlsx' from column B, leave column A as it is.

I did a few searches, the closest to what I want is this Modifying an excel sheet in a excel book with pandas

but it does not allow me the keep column A in the original sheet (column A has some equations I do want to keep them), any idea how to do it? Thanks

Zhifang Hu
  • 241
  • 1
  • 3
  • 8

1 Answers1

0

Would reading column A and inserting it to the fresh data you want to write solve your problem?

jbarguil
  • 254
  • 2
  • 5