Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
114 views
in Technique[技术] by (71.8m points)

python - ModuleNotFoundError: No module named 'xlxswriter'

Language: Python 3.8.3
I faced this error when I was importing my xlxs file ModuleNotFoundError: No module named 'xlxswriter'

import xlxswriter

import pandas as pd

from pandas import DataFrame

path = ('mypath.xlxs')

xl = pd.ExcelFile(path)

print(xl.sheet_names)

How can I fix this?

question from:https://stackoverflow.com/questions/65647981/modulenotfounderror-no-module-named-xlxswriter

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Instead of typing xlsx, type xlsx like this:

import xlsxwriter

import pandas as pd

from pandas import DataFrame

path = ('mypath.xlsx')

xl = pd.ExcelFile(path)

print(xl.sheet_names)

It'll work.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...