用C#将Excel转换成pdf(急)在线等待

jiajia20042004 2008-08-25 01:44:03
希望提供源码!!
...全文
853 10 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
wudiksp 2012-07-10
  • 打赏
  • 举报
回复
回复九楼:
有没有不用Excel组件的C#方法?或等三方的
D13ay 2011-10-13
  • 打赏
  • 举报
回复
Excel.XlFixedFormatType targetType = Excel.XlFixedFormatType.xlTypePDF;
object missing = Type.Missing;
Excel.ApplicationClass application = null;
Excel.Workbook workBook = null;
try
{
application = new Excel.ApplicationClass();

object target = targetPath;
object type = targetType;
workBook = application.Workbooks.Open(sourcePath, missing, missing, missing, missing, missing,
missing, missing, missing, missing, missing, missing, missing, missing, missing);

application.DisplayAlerts = false;

workBook.ExportAsFixedFormat(targetType, target, Excel.XlFixedFormatQuality.xlQualityStandard, true, false, missing, missing, missing, missing);

sourcePath:excel文件地址
target:转换后的pdf存放地址
jiajia20042004 2008-08-26
  • 打赏
  • 举报
回复
二楼什么意思 itextsharp是什么?
LV_Q 2008-08-25
  • 打赏
  • 举报
回复
tomiehu 2008-08-25
  • 打赏
  • 举报
回复
帮顶了
jiajia20042004 2008-08-25
  • 打赏
  • 举报
回复
没有人会吗?呜呜
jiajia20042004 2008-08-25
  • 打赏
  • 举报
回复
WEBFORM
JTFLSH 2008-08-25
  • 打赏
  • 举报
回复
WINFORM还是WEBFORM?
sl2161 2008-08-25
  • 打赏
  • 举报
回复
提供个思路:
利用第三方组件componentone
ViewStates 2008-08-25
  • 打赏
  • 举报
回复
itextsharp

111,094

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧