Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
how to open password protected excel file in .net
Ramesh gawade
Apr 18 2017 8:54 AM
256
Reply
error : External table is not in the expected format.
code:
connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;" + @"Data Source=" + fName + ";" + @"Jet OLEDB:Database Password=Test" + ";" + @"Extended Properties=" + Convert.ToChar(34).ToString() + @"Excel 8.0" + Convert.ToChar(34).ToString() + ";";
OleDbConnection OleDbcon = new OleDbConnection(connectionString);
OleDbDataAdapter adp = new OleDbDataAdapter("select * from [Sheet1$]", OleDbcon);
adp.FillSchema(dt1, SchemaType.Source);
adp.Fill(dt1);
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
how to round of in sql
About project how to create web application