当前位置:首页 > Web开发 > 正文

newFilePath.LastIndexOf( " / " ) + 1 ); if (! Directory.Exi

2024-03-31 Web开发

Aspose.Cells Excel转成pdf

/// <summary> /// excel转pdf /// </summary> /// <param>文件地点</param> /// <param>转换后的文件地点</param> /// <returns></returns> public static void ExcelToPdf(string path, string newFilePath) { var dir = newFilePath.Substring(0, newFilePath.LastIndexOf("/") + 1); if (!Directory.Exists(dir)) { Directory.CreateDirectory(dir); } Aspose.Cells.Workbook excel = new Aspose.Cells.Workbook(path); excel.Save(newFilePath, Aspose.Cells.SaveFormat.Pdf); }

Aspose.Cells将Excel转成pdf

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/32559.html