Hi,
The warning message you have shared us is due to invalid version. Please follow the below code snippets to save the file in respective version.
Code Snippet:
//To Save file in .xls Format
workbook.Version = ExcelVersion.Excel97to2003;
workbook.SaveAs("[FileName].xls");
//To Save file in .xlsx Format
workbook.Version = ExcelVersion.Excel2007;
workbook.SaveAs("[FileName].xlsx");
Please lets us know if you need any clarification.
Regards,
Vikas