I was able to IMPORT from excel data at the start of my project when both the .nb and EXCEL XLS files were sitting in MyDocument (or some other location), but upon moving both files into my Dropbox location, when I opened my .nb file again, IMPORT fails with 'File not found during Import'? I assume having both in the same directory is not suffice, but rather IMPORT only looks for file as defined by path setting within Mathematica? If so how to change it so that regardless of where I put the .nb and excel files, as long as they are both in the same directory I can do IMPORT?
1 Answer
If the file you wish to import will always be kept in the same directory as your Mathematica notebook you may do:
Import[NotebookDirectory[] <> "filename"]
or
Import[FileNameJoin[{NotebookDirectory[], "filename"}]]
ref/$Path
$\endgroup$