title: Use EPPlus to open spreadsheet from server/LAN folder
body: <p>I'm trying to use the <a href="https://epplus.codeplex.com/" rel="nofollow">EPPlus</a> plugin to open a spreadsheet on our LAN and having mixed results. In another program, an intranet website, the user can upload a spreadhsheet and the <code>ExcelPackage</code> object is able to open the worksheet based on the index. </p>
  
  <p>However, now that I'm trying to open a spreadsheet based on a file path, as opposed to an <a href="http://msdn.microsoft.com/en-us/library/system.web.httprequest.inputstream%28v=vs.110%29.aspx" rel="nofollow">HttpRequest.InputStream</a> I get he error</p>
  
  <pre><code>The given key was not present in the dictionary.
  </code></pre>
  
  <p>Instead of identifying the Worksheet I want to open via the index, I now need to specify it by name, which isn't the best option when dealing with multiple users like we are.</p>
  
  <p>Does anyone know how, using EPPlus, to use an index to specify which worksheet they want to open when accessing and Excel spreadsheet from a LAN/server folder/location?</p>
  
  <p>Here's my most recent attempt.</p>
  
  <pre><code>string path = System.IO.Path.Combine(_connString, "ZipCodeTest.xlsx");
  
  FileStream stream = File.Open(path, FileMode.Open, FileAccess.Read);
  
  //EPPlus
  FileInfo file = new FileInfo(path);
  ExcelPackage package = new ExcelPackage();
  package.Load(stream);
  sheet = package.Workbook.Worksheets["Query1"];
  </code></pre>
  
  <p>I'd like the final line to read like this: </p>
  
  <pre><code>sheet = package.Workbook.Worksheets[0];
  </code></pre>