When i am trying to delete some sheet from excel file i am getting “XML file reading error” i am using below python code to delete sheet with the name of “Evaluation”.
import openpyxl as xl
wb1 = xl.load_workbook(“file location with path”)
print(wb1.sheetnames)
for i in wb1.sheetnames:
if(i.find(“Evaluation”) == 0 or i.find(“Evaluation”.lower()) == 0):
del wb1[i]
wb1.close()
wb1.save(“file saving location”)
I am writing this code python script node and when i am executing this code in the node i am getting below error.
“”"
, in
File “src/lxml/etree.pyx”, line 3521, in lxml.etree.parse
File “src/lxml/parser.pxi”, line 1859, in lxml.etree._parseDocument
File “src/lxml/parser.pxi”, line 1885, in lxml.etree._parseDocumentFromURL
File “src/lxml/parser.pxi”, line 1789, in lxml.etree._parseDocFromFile
File “src/lxml/parser.pxi”, line 1177, in lxml.etree._BaseParser._parseDocFromFile
File “src/lxml/parser.pxi”, line 615, in lxml.etree._ParserContext._handleParseResultDoc
File “src/lxml/parser.pxi”, line 725, in lxml.etree._handleParseResult
File “src/lxml/parser.pxi”, line 652, in lxml.etree._raiseParseError
OSError: Error reading file ‘xmlfile.xml’: failed to load external entity “xmlfile.xml”
“”"
This error so if you guys have any idea or guidance to solve this error please guide. for your better understanding i have attached image of an error.
Thank you guys in advance