I would like to save xls or xlsx files to a csv extension pipe separated. The following code I use, the XlFileFormat is only possible to save it as an csv comma separated as you can see on the Microsoft info page.
using Microsoft.Office.Interop.Excel;
var excel = new Application();
var wbk = excel.Workbooks.Open(sourceFileLocation, 0, true, 5, "", "", true, XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
wbk.SaveAs(targetFileLocation, XlFileFormat.xlCSVMac, AccessMode: XlSaveAsAccessMode.xlExclusive);
I could save it with a comma sperated and open the file again and change all commas in a pipe, but this is an ugly way. Is there another easy way to save the document to a pipe separated CSV?