By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,842 Members | 2,198 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,842 IT Pros & Developers. It's quick & easy.

Import Excel File that Starts with Number

P: 1
Hello all -

I have files I'm trying to import. I do not name these files, they're created by another department. The files start with a number, usually the year. Each time I try to do so I get an error message:

Error:
FileNotFoundError: [Errno 2] No such file or directory: 'N:\\Learing KPI Report\Background Files\X818 Online.xlsx'
The file name is '2018 Online' so not sure why it appears as 'X818' in the error message.

I'm using pandas to import:

Expand|Select|Wrap|Line Numbers
  1. import pandas as pd
  2. df = pd.read_excel ("N:\Learing KPI Report\Background Files\X818 Online.xlsx")
I tried importing another file from the same folder that did not start with a number just for kicks and giggles and it imported just fine.

Any assistance is appreciated.

Thanks!
Dec 21 '18 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,335
The error message shows X818 because in the code you wrote X818
Dec 21 '18 #2

Post your reply

Sign in to post your reply or Sign up for a free account.