在c#windows应用程序中将excel转换为pdf

问题描述:

亲爱的先生





我有一个用c#生成的excel文件,现在我想把它转换成pdf文件而不使用任何其他dll或第三方工具

Dear Sir


I have a excel file generated in c# and now i want to convert it into pdf file without using any other dll or third party tool

excel格式是否为2007+?您将需要使用Excel互操作来研究自动化:



http://*.com/questions/7906722/save-entire-workbook-as-pdf-excel-2010-c [ ^ ]







使用openxml



http://fczaja.blogspot.co.uk/ 2013/05 / how-to-read-and-write-excel-cells-with.html [ ^ ]



和然后用以下内容写出数据:



http:// www。 pdfsharp.com/PDFsharp/ [ ^ ]



无论如何,你要去需要某种dll /工具我不能想到一种不太准确的方法。这些都是优秀的工具,无论是开源还是免费。为什么在已经完成时浪费时间做某事?
Is the excel format 2007+? You are going to need to look into automation by using Excel interop:

http://*.com/questions/7906722/save-entire-workbook-as-pdf-excel-2010-c[^]

or

use openxml

http://fczaja.blogspot.co.uk/2013/05/how-to-read-and-write-excel-cells-with.html[^]

and then write the data out using something like:

http://www.pdfsharp.com/PDFsharp/[^]

either way, you are going to need some sort of dll / tool I cant think of a way not too accurately. These are excellent tools and either open source or free. Why waste time doing something when it is already done?


请参考以下链接: -

http://www.c-sharpcorner.com/Resources/2080/ [ ^ ]
refer below link:-
http://www.c-sharpcorner.com/Resources/2080/[^]