在c#windows应用程序中将excel转换为pdf [英] convert excel to pdf in c# windows application

查看:114
本文介绍了在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://stackoverflow.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://stackoverflow.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/[^]


这篇关于在c#windows应用程序中将excel转换为pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆