Hi friends ,
Can you pls help how to do import an excel file into my MYSQL database in ASP.net C# ?
Pls help and thanks a lot ...
View Complete Post
I am importing the data from excel file using following code.
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(strFolderFileName) & ";Extended Properties=HTML Import;" conn = New OleDbConnection(connstr) Dim strSQL As String = "SELECT * FROM [" & strWorkSheetName & "]" Dim cmd As New OleDbCommand(strSQL, conn) Dim da As New OleDbDataAdapter(cmd) da.Fill(datatable)
Now the problem is if a coulmn vlaue start with a number value like "15" then the other string value like "W15" in that column is ignored in the datatable.
eg. The excel column value Column1
I am trying to import an excel file in SQL Server 2005 through "OPENROWSET" command.But the problem is in excel there is a column with cell values preceding with '0's.e.g. '000987','000008' etc..the excel
file has rows more than a lakhs so manually edit each row is absurd. but while I'm trying to import the data its getting values without the preceding '0's....So please suggest me how do I import the data through SQL Server scripting...
Can explain me how to do this and send me code to try ?
I'd like to export an non-MS MySQL database and re-import it into CRM but I'd like to keep the relationships (foreign keys) between tables in the MySQL database in the CRM system. Does anyone know the best way to do such a thing?