954,560 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Import XLS/XLSX file to table by clicking button

Hello guys,

I've been to a lot of forums and discussions about this but I never found precise solution.

I'm having a WEB application in ASP.NET written in C# and a MySQL database behind.
I made a button "Import from Excel" which has SQL command:

"LOAD DATA INFILE 'importTest2MorePads.csv' INTO TABLE management FIELDS TERMINATED BY ','"

This is working just fine. But what I want is to import Excel file not a CSV. As far as I read, LOAD DATA command does not support excel files because they are binary (not sure about that).
If I use instead the phpMyAdmin tool for Importing data which is pretty easy actually I get everything imported without any problems.

So the problem is in my sql command for the button if I get it right.
Do you know what command should I use so I import xls files directly from my app to the database?

Please help me I will appreciate it.

Thanks

pepyrs
Light Poster
25 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: