Unless you've changed your project settings, when your C# app gets built, it is being built in a bin/debug (or bin/release) folder under your project. When you run from the IDE, that's the current working directory for your app.
Try using an absolute path, or moving the data.xls file into your application's bin/debug folder.
When you specify the absolute path, make sure to prefix the string with an @ sign to escape out the slashes. string path = @"c:\data\excel\data.xls";
UPDATE:
If you need to use a relative path, I would get the absolute path based on the relative patht this way:
FileInfo fileInfo = new FileInfo("data.xls");
String path = fileInfo.FullName;
This might be preferable to getting the full path based on the .exe location, because it will work even if the CWD is not the same as the .exe location.