如何将pdf导出为ex​​cel [英] How to Export pdf to excel

查看:119
本文介绍了如何将pdf导出为ex​​cel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用这些代码以pdf格式获取水晶报告。现在我需要将它显示到Excel。我没有使用过报表查看器。提前谢谢。

I have used these code to get the crystal report in pdf. Now I need to display it to Excel. I have not used report viewer.Thanks in advance.

ReportDocument rptDoc = new ReportDocument();
MemoryStream oStream = default(MemoryStream);
oStream=(MemoryStream)rptDoc.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.ContentType = "application/pdf";
HttpContext.Current.Response.BinaryWrite(oStream.ToArray());
HttpContext.Current.Response.End();
rptDoc.Close();
rptDoc.Dispose();

推荐答案

check 如何以excel格式或excel表格导出水晶报表数据 [ ^ ]
check How to export crystal report data in excel format or in excel sheet[^]


请参阅以下链接,这可能对您有所帮助 http://www.aspsnippets.com/Articles/Export-Crystal-Report-on-Button-Click-to-Word-Excel-PDF-and-CSV- in-ASPNet.aspx [ ^ ]
Refer below link this might be helpful to you http://www.aspsnippets.com/Articles/Export-Crystal-Report-on-Button-Click-to-Word-Excel-PDF-and-CSV-in-ASPNet.aspx[^]


这篇关于如何将pdf导出为ex​​cel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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