daily pastebin goal
24%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var fileName = string.Format("C:\Drafts\Excel 97-2003 formats\All Data 09 26 2012_Edited.xls");
  2.         var connectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; data source={0}; Extended Properties=Excel 8.0;", fileName);
  3.  
  4.         var adapter = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", connectionString);
  5.  
  6.         DataSet Originalds = new DataSet();
  7.         adapter.Fill(Originalds, "Employees"); // this is where the error shows up
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top