CApplication ExcelApp;
ExcelApp.put_DisplayAlerts(FALSE);
book.SaveAs(_variant_t(strSaveAsName), _variant_t((long)56), vtMissing, vtMissing, vtMissing,
vtMissing, 0,vtMissing , vtMissing, vtMissing,
vtMissing,vtMissing);
ExcelApp.put_DisplayAlerts(TRUE);
解决方法:在调用SaveAs函数的前后加上如上两行代码