Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 2.7 Openpyxl UserWarning

Why do I receive this warning message every time I run my code? (below). Is it possible to get rid of it? If so, how do I do that?

My code:

from openpyxl import load_workbook
from openpyxl import Workbook

wb = load_workbook('NFL.xlsx', data_only = True)
ws = wb.active
sh = wb["Sheet1"]


ptsDiff = (sh['J127'].value)
print ptsDiff

The code works but I get this warning message:

Warning (from warnings module):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openpyxl/reader/worksheet.py", line 320
warn(msg)
UserWarning: Unknown extension is not supported and will be removed
like image 985
jcmcdonald Avatar asked Dec 16 '15 21:12

jcmcdonald


1 Answers

This error happens when openpyxl cannot understand/read an extension (source). Here is the list of built-in extensions openpyxl currently knows that is doesn't support:

  • Conditional Formatting
  • Data Validation
  • Sparkline Group
  • Slicer List
  • Protected Range
  • Ignored Error
  • Web Extension
  • Slicer List
  • Timeline Ref

Also see the Worksheet extension list specification.

like image 184
alecxe Avatar answered Sep 28 '22 16:09

alecxe