C#中对Excel文件执行写数据操作:

先编写一个函数

private static string CPath(string path)
    {
        var index = path.LastIndexOf("/");
        var temp = path.Substring(0, index);
        if (!Directory.Exists(temp))//如果不存在就创建file文件夹                               
            Directory.CreateDirectory(temp);//创建该文件夹    
        return path;
    }
C#中对Excel文件执行写数据操作

写入数据操作,代码添加在使用函数中。

相关文章:

  • 2021-12-12
  • 2021-11-23
  • 2022-12-23
  • 2021-12-27
  • 2021-12-28
  • 2021-12-14
  • 2021-10-04
猜你喜欢
  • 2022-01-28
  • 2022-12-23
  • 2021-12-27
  • 2021-11-28
  • 2022-01-13
相关资源
相似解决方案