/// <summary>
/// 将excel文档转换成PDF格式
/// </summary>
/// <param name="sourcePath">源文件路径</param>
/// <param name="targetPath">目标文件路径</param>
/// <param name="targetType"></param>
/// <returns></returns>
public static bool ExcelConvertPDF(string sourcePath, string targetPath)
{
try
{
Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook(sourcePath);
workbook.Save(targetPath, Aspose.Cells.SaveFormat.Pdf);
}
catch (Exception)
{
return false;
}
return true;
}