title: Convert xls or xlsx file with multiple sheets into one csv file using interop
body: <p>I am trying to convert a xls or xlsx file with multiple sheets into one CSV file using c# and the interop library. I am only getting the one sheet in the CSV file. I know I can specify the sheet to save as or change the active sheet to save that one but I am looking for a solution to append all the sheets to the same CSV file that will work with both xls and xlsx files. I am automating this and don't care what is in the excel document just want to pull the string values out and append it to the csv file. Here is the code I am using:</p>
  
  <pre><code>Microsoft.Office.Interop.Excel.Application app = new Microsoft.Office.Interop.Excel.Application();
  app.Visible = false;
  app.DisplayAlerts = false;
  Workbook wkb = app.Workbooks.Open(fullFilePath);
  wkb.SaveAs(newFileName, XlFileFormat.xlCSVWindows);
  </code></pre>
  
  <p>Is this even possible?</p>