title: Reading Excel File in C# using MS Visual Studio 2010: How to give Relative Path?
body: <p>I am reading an Excel file in the following way:</p>
  
  <pre><code>string path = @"C:\Users\myUserName\inputfile.xlsx";
  Excel.Application app = new Application();
  Excel.Workbook workbook = app.Workbooks.Open(path, 0, true, 5, "", "", true, Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
  </code></pre>
  
  <p>I was wondering if there is any way I can give relative path instead of hard-coded absolute path. What I have in mind is to put the inputfile.xlsx in the same directory and do something like...  </p>
  
  <pre><code>string path = @"inputfile.xlsx";  
  </code></pre>
  
  <p>But, it gives "COMException unhandled..", "inputfile.xlsx not found"</p>