//ex: c:\temp\file.xlm
string o = project.Variables["downloaded"].Value;
//ex: c:\temp\final.xls
string d = project.Variables["final"].Value;
Application excel = new Application();
Workbook wb = excel.Workbooks.Open(o);
wb.Activate(); //activate tab
wb.DoNotPromptForConvert = true; //ignore errors
wb.CheckCompatibility = false; //ignore compatibility
excel.DisplayAlerts = false; //don't show anything
try{
wb.SaveAs(d, XlFileFormat.xlOpenXMLWorkbook);
}
catch (Exception e){
project.SendInfoToLog(e.ToString());
System.Windows.Forms.MessageBox.Show("Fail to save "+e.ToString()+":\nSource: "+o+"\n Destiny: "+d,"Erro");
}
wb.Close();
excel.Quit();