Convert .XLS to tab separated .TXT
问题 Can I somehow convert Excel .XLS file to txt-tsv (tab-separated-values) file, using C#? 回答1: You may read that XLS file easily via OleDb (ADO.NET provider) and create a StreamWriter object to write data into the Text/TSV file. using (OleDbConnection cn = new OleDbConnection()) { using (OleDbCommand cmd = new OleDbCommand()) { cn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @"C:\path\file.xls" + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1\";"; cmd.Connection = cn;