Personally I would use interop, since if you are creating Excel files the end user probably needs to use them and will have some version of Excel installed. Even if she / he doesn't need to view them they will probably have Excel. :)
You don't need to know which version the user has installed, except maybe for the file extension on save. Here's a little snippet from some code I used to set the variables on a SaveFileDialog instance which allowed the user to specify a save location:
Microsoft.Office.Interop.Excel.Application excelApp =
new Microsoft.Office.Interop.Excel.Application();
string strVersion = excelApp.Version;
string[] strsVersion = strVersion.Split('.');
int version = Convert.ToInt32(strsVersion[0]);
if (version >=12)
{
sfd.Filter = "Excel Workbook|*.xlsx";
sfd.DefaultExt = "xlsx";
}
else if (version > 0 && version < 12)
{
sfd.Filter = "Excel Workbook|*.xls";
sfd.DefaultExt = "xls";
}
else
{
}
Here you can see the SaveFileDialog (sfd) being set up to add the proper path + extension to sdf.FileName. This is later used to save the spreadsheet in this way:
eWorkbook.SaveAs(OutputPath,
Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookDefault);
eWorkbook.Close(true);
Note the lack of Type.Missing arguments: they are optional. OutputPath was defined by the user using sfd.