string TempFileLocation="Filelocation";
string tempfilename ="FileName";
string TabName ="TabName";
string xConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" +TempFileLocation+ tempfilename +".xls;Extended Properties='Excel 8.0;HDR=YES'";
var conn = new OleDbConnection(xConnStr);
string ColumnName ="[columename] varchar(255)"
conn.Open();
var cmd = new OleDbCommand("CREATE TABLE [" + TabName + "] (" + ColumnName + ")", conn);
cmd.ExecuteNonQuery();
conn.Close();
I using above code to create the table but it did not allow me to create ColumnName with more than 64 characters. Please give me soluition for this problem.
The column name cannot be over 64 characters.
According to MSDN: