0

I want to create an external reference to cells in an Excel spreadsheet named Employee Data.xls.

When I enter the formula =[Employee Data.xls]sheet1!A1, I keep getting the error "The name that you entered is not valid. The name contains a space or other invalid characters".

Error message

I've tried a few different formulas, including:

  • =[Employee Data.xls]sheet1!A1
  • =["Employee Data.xls"]sheet1!A1
  • =[Employee%20Data.xls]sheet1!A1
  • =[Employee\ Data.xls]sheet1!A1

The only "solution" I've found is renaming the file to remove the spaces (i.e. EmployeeData.xls).

How can I reference an external file in Excel if the filename contains spaces?

2

Try it this way:

='[Employee Data.xls]sheet1'!A1

Moreover, if the file is closed, you can add the path in the beginning, i.e.

='C:\My Folder\[Employee Data.xls]sheet1'!A1

p.s. Excel will add the path automatically if you close the file.

2
  • Is it possible to use a relative path for a closed file? (i.e. spreadsheet is in same folder as current file) – Stevoisiak Jul 7 '17 at 18:41
  • @StevenVascellaro if the file is closed you need full path, as in the last part I just added. p.s: Twin thinking :) – A.S.H Jul 7 '17 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.