我想在打印预览中打开Excel文件,而不显示它,并将其保存为PDF或图像文件。
有可能吗?我怎么能意识到这一点?
发布于 2016-11-08 01:56:19
它可以使用工作表对象的ExportAsFixedFormat方法来完成:
using Excel = Microsoft.Office.Interop.Excel;
Excel.Worksheet ws; // you need to assign this somehow
ws.ExportAsFixedFormat(Excel.XlFixedFormatType.xlTypePDF,
@"c:\YourFile.pdf", Excel.XlFixedFormatQuality.xlQualityStandard);https://stackoverflow.com/questions/40438019
复制相似问题