0

I want to read a file with pd.read_excel and also load_workbook and I have persian names in my path. I get the following error: FileNotFoundError: No such file

my code:

df1 = pd.read_excel(r'X:\\Frosh\\دیتابیس فروش\\ ثبت اطلاعات فروش.xlsx', sheet_name='پيش فاکتور')
wb3=load_workbook(r'X:\\Frosh\\ ثبت اطلاعات پيش فاکتور\\ ایجاد پیش فاکتور\\ پیش فاکتورها \\ ثبت اطلاعات فروش.xlsx')

I also tried to use encoding='utf-8', but again I receive an error regarding an incorrect element in read_excel. I would be grateful if you help me. I should mention that I am coding for the company in which I am working and it is located in Iran so it's better to have path names in Persian in order to be understood by others.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Usefi
  • 1

1 Answers1

0
wb = xlrd.open_workbook("دیتابیس فروش ثبت اطلاعات فروش.xlsx", encoding_override='utf-8')
df = pd.read_excel(wb)
Rishin Rahim
  • 655
  • 4
  • 14
  • again I receive the same error: wb = xlrd.open_workbook(r'X:\\Frosh\\دیتابیس فروش\\ ثبت اطلاعات فروش.xlsx', encoding_override='utf-8') df = pd.read_excel(wb) FileNotFoundError: [Errno 2] No such file or directory: 'X:\\\\Frosh\\\\دیتابیس فروش\\\\ ثبت اطلاعات فروش.xlsx' – Usefi May 11 '21 at 07:27