0

My problem main is when modify one sheet and save the book, all sheet save as text include sheet with pivot table.

This is my code:

import openpyxl
xfile = openpyxl.load_workbook('book1.xlsx')
sheet = xfile.get_sheet_by_name('my_data')
sheet['A2'] = 'hello world'
xfile.save('book2.xlsx') #all sheets of book save as text
Chevelle
  • 248
  • 5
  • 13
  • https://stackoverflow.com/questions/28142420/can-pandas-read-and-modify-a-single-excel-file-worksheet-tab-without-modifying – BENY Dec 26 '17 at 21:39

1 Answers1

0

I had this same issue today. I updated my openpyxl to be version 2.5 and it worked fine. Have you tried updating and still getting the issue?

Eric Shreve
  • 176
  • 1
  • 3
  • 10
  • Thanks Eric! I fixed my problem only upgrading the library openpyxl to version 2.5. I am working with Anaconda in Windows, then, for library update execute this command in consola: conda install -c conda-forge openpyxl – Chevelle Dec 30 '17 at 14:10