Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application();
                if (xlApp == null)
                {
                    return false;
                }
                int FormatNum;//保存excel文件的格式
                string Version;//excel版本号
                Version = xlApp.Version;//获取你使用的excel 的版本号
                if (Convert.ToDouble(Version) < 12)//You use Excel 97-2003
                {
                    FormatNum = -4143;
                }
                else//you use excel 2007 or later
                {
                    FormatNum = 56;
                }

  

 workbook.SaveAs(filepath, FormatNum);

  

相关文章:

  • 2022-02-17
  • 2021-09-10
  • 2022-12-23
  • 2021-10-21
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案