我有一份报告正在导出为 .csv
,我需要提供另外两种格式的报告 - .xlsx
和.pdf
,添加页眉/页脚/图像。
最初,我的计划是使用 Microsoft.Office.Interop.Excel
打开.csv
,修改为 EPPlus
添加页眉/页脚/ Logo ,并将其另存为 .xlsx
文件,然后将其导出为 .pdf
但应用程序在 IIS 中运行,并且不建议或不支持自动化办公服务器端。
1) 是否有免费的商业用途工具可以打开 .CSV 文件并将其另存为 .XLSX?
- EPPlus 是最佳选择,因为我可以打开 CSV 文件、编辑它们并另存为 Excel,这满足了我的要求。
2) 是否有任何免费的商业用途工具可用于将 Excel .XLSX 文件导出为 .PDF?
3)有没有一种工具可以同时完成这两项任务?
最佳答案
要非常轻松地基于模型读取 csv 文件,您可以使用文件助手。
要创建 excel 文件,您可以使用 epplus,这非常好:
http://epplus.codeplex.com/ EPPlus 是一个 .net 库,它使用 Open Office Xml 格式 (xlsx) 读取和写入 Excel 2007/2010 文件。 GNU 库通用公共(public)许可证 (LGPL)
要创建 pdf 文件,您可以使用 PdfSharp
http://www.pdfsharp.net/Licensing.ashx
PDFsharp 和 MigraDoc Foundation 根据 MIT 许可证发布。
请参阅 PDFsharp 许可证。 请参阅 MigraDoc 基金会许可证。
PDFsharp and MigraDoc Foundation are Open Source and free to use Copy, modify and integrate the source code of PDFsharp and MigraDoc Foundation in your applications without restrictions at all This also applies to commercial products (both Open Source and Closed Source) PDFsharp and MigraDoc Foundation will remain Open Source and free to use even in the far future
关于c# - .NET 的免费商业用途工具可以将 csv 转换为 excel 并将 excel 导出为 pdf?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13239913/