Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
Import Excal file into MySql database
May 05, 2009
thank you so much to send me reply and give better idea. well sir if i m import exacl into Mysql then its also good thing. so tell me how can i import exacal file into mysql database using .net2005. if you have any code or solution of it then please reply me fast .its to urgent sir.
Thanks in Advance
Posted Date: May 06, 2009 Points: 5
Posted Date: May 10, 2009 Points: 5
Please refer this once,
Here 'PrmPathExcelFile'--is Excel File path
Here i'm binding Data from Excel to DataGrid.
if u want u can post this dataset data directly to Data base with out binding to DataGrid.
Dim MyConnection As System.Data.OleDb.OleDbConnection
Dim dao_dbE As DAO.DBEngine
Dim dao_DB As DAO.Database
Dim strFirstSheetName As String
dao_dbE = New DAO.DBEngine
dao_DB = dao_dbE.OpenDatabase(PrmPathExcelFile, False, True, "Excel 8.0;")
strFirstSheetName = dao_DB.TableDefs(0).Name
''''''' Fetch Data from Excel
Dim DtSet As System.Data.DataSet
Dim MyCommand As System.Data.OleDb.OleDbDataAdapter
MyConnection = New System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0; " & "data source='" & PrmPathExcelFile & " '; " & "Extended Properties=Excel 8.0;")
' Select the data from Sheet1 of the workbook.
MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [" & strFirstSheetName & "]", MyConnection)
DtSet = New System.Data.DataSet
DataGrid1.DataSource = DtSet.Tables(0)
Catch ex As Exception
Posted Date: August 22, 2009 Points: 5
Better to use SqlYog for that as it provides you to directly import .csv file which will also reflect in Mysql.
You can also use an inline command provided by Mysql to import a .csv or .txt file
To post reply
Related Questions Related Questions
Import Excal file into MySql using .net2005
import excal file into mysql usnig C#
import excel file into sql database table
read excel file and save into database
Restore and backup mysql database in asp.net
How to create exe file with database including and softwares needed at client system
How to import text file in Excel
MySQL log file location
how to upload default image into database when no image file is selected from fileupload control in
How to read Unicode form PDF File and Save into DataBase ?
Latest Forum Questions From The Same Category
database is read-only.
editor for visual basic with c#.net
How to get phone number in .Net windows application?
while accessing method from proxy giving an unauthorized access
How to make search between two dates accept null not obligatory search proplem
Create a Windows form application using Excel as database..
Recieve Data From Serial Com Port C# In One Line And Convert To integer
display parent data and child data as a row group in one datagridview using c# winform
enter key event in windows app c#.net
windows appplication c#.net
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend