0
Sting TempFileLocation="Filelocation";
Sting tempfilename ="FileName";
Sting 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();
任何人都知道鋤頭刪除Excel文件列標題。 爲此求解 訪問Cant create Excel file using OLEDB C#如何刪除Excel文件標題C#,Oledb
我使用了臨時標題。創建Excel後,我需要刪除所有臨時標題。請任何人知道如何做,請讓我知道。謝謝