TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
philippe.alet
NA
3
0
Convert Excel 4.0 into recent Excel Version in C#
Nov 24 2004 4:24 AM
I need to import in my win form appli some Excel files created in Excel 4.0 and I don't control this export format origin. I tried many way to use ODBC adapters to import these data but it works only for Excel 2000 and above. I am looking: 1: A code/program/utility than convert Excel 4.0 in Excel X.X version (recent) or 2: Modify the code of my ODBC adapter to support Excel 4.0 file (see current code below In addition, do anybody know how we can get the excel version of a file in C# ? Thanks for your help Mikels Code: string strFilename = openFileDialog1.FileName; string ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strFilename + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1\""; OleDbConnection Connectxls = new OleDbConnection(ConnectString); OleDbDataAdapter myCommand = new OleDbDataAdapter("SELECT * FROM [Sheet1$B1:O250]", Connectxls); DataTable RawData = new DataTable(); Connectxls.Open(); myCommand.Fill(RawData);
Reply
Answers (
0
)
Problems with using the Web Browser controlin .NET
ConfigurationFile and COM interop