Problems with openpyxl. Open Excel File with Python

Asked

Viewed 933 times

0

I am trying to read an Excel file but it appears this error message.

Warning (from warnings module):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/openpyxl/reader/worksheet.py", line 318
    warn(msg)
UserWarning: Unknown extension is not supported and will be removed
<class 'openpyxl.workbook.workbook.Workbook'>

Warning (from warnings module):
  File "/Users/edson/PycharmProjects/Projetos/Projeto_10.py", line 7
    wb.get_sheet_names()
DeprecationWarning: Call to deprecated function get_sheet_names (Use wb.sheetnames).

Using Python3 on Mac

#Abrir planilha do Excel

import openpyxl
wb = openpyxl.load_workbook('cata_logo.xlsx')
type(wb)
print(type(wb))
wb.get_sheet_names()
  • 1

    Are you saying that the function get_sheet_names is obsolete, and is asking to use the function wb.sheetnames.

  • Related: https://stackoverflow.com/questions/34322231/python-2-7-openpyxl-userwarning

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.