title: Get Data From An Uploaded Excel File Without Saving to File System
body: <p>I have a requirement to allow a user of this ASP.NET web application to upload a specifically formatted Excel spreadsheet, fill arrays with data from the spreadsheet, and bind the arrays to a Oracle stored procedure for validation and insertion into the database.  I must be able to read the data from the Excel spreadsheet without being able to save it to the web server's hard disk.  This is the part I cannot figure out how to do.  Here's a simple code example.</p>
  
  <pre><code>&lt;%--ASP.NET Declarative--%&gt;
  &lt;asp:FileUpload ID="FileUpload1" runat="server" /&gt;
  &lt;asp:Button ID="Button1" runat="server" Text="Send File" OnClick="Button1_Click" /&gt;
  
  // C# Code-Behind
  protected void Button1_Click(object sender, EventArgs e) {
      var postedFile = FileUpload1.PostedFile;
  
      // ... Read file in memory and put in format to send to stored procedure ...
  
  }
  </code></pre>
  
  <p>Can anyone help me with this?  I appreciate anyone's consideration.</p>
  
  <p>thx,<br />
  gabe</p>