如何在C#中将多个工作表保存为pdf文件

如何在C#中将多个工作表保存为pdf文件

问题描述:

大家好,

我有wpf项目,我希望将excel文件(2010)的数据保存为pdf文件。



my excel文件有4张,我想用Excel互操作将它们中的3个保存为3页pdf



我试试ThisWorkbook.Sheets(数组(Sheet1,Sheet2) ,Sheet3))。选择,但是这个命令不起作用。



请帮帮我



提前感谢!

Hi All,
I have wpf project and I want save data of excel file(2010) to pdf file.

my excel file have 4 sheet and I want save 3 of them to 3 pages in pdf using Excel interop

I try ThisWorkbook.Sheets(Array("Sheet1", "Sheet2","Sheet3")).Select, But this command don't work.

please help me

thanks in advance!

有一个解决方法,请查看此网站,了解 msdn [š]
There is a workaround for this, check this website for the logic used by msdn[š]