Your post's title says you have an error creating file, but is it one reading the file?
I suggest two things. Firstly let the error message show instead of trapping and discarding it. Secondly change the part where you specifiy the path so that \ is not an escape character:
Code:
DataTable test = getDataFromXLS(@"c:\temp.xls");
If that fails then post the exact error message, might be that your asp.net account does not have permissions on that file for example.