darma teja

darma teja

  • NA
  • 496
  • 338.5k

xls to csv format

Mar 15 2013 4:56 AM
Hi,

I tried to convert my excel file into csv file format.

I wrote code like this:
Microsoft.Office.Interop.Excel.Application app = new Microsoft.Office.Interop.Excel.Application();
Microsoft.Office.Interop.Excel.Workbook wb = app.Workbooks.Open(@"Tabelle1.xls");
wb.SaveAs(@"\\Desktop\output.csv",  Microsoft.Office.Interop.Excel.XlFileFormat.xlCSVWindows);

My problem now is that the output file should be in unicode format.

if i write code like this: It works fine as it is unicode format. But the file is not in csv format.
wb.SaveAs(@"\\Desktop\output.csv", Microsoft.Office.Interop.Excel.XlFileFormat.xlUnicodeText);

Thanks
Darma





Answers (3)