c# - .NET 的免费商业用途工具可以将 csv 转换为 excel 并将 excel 导出为 pdf?

标签 c# .net excel csv pdf-generation

我有一份报告正在导出为 .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 文件,您可以使用文件助手。

http://www.filehelpers.net/

创建 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/

相关文章:

c# - 如何使用 MS 随机指标

excel - SSRS 2008 调色板变化

c# - .NET序列化: Best practice to map classes to elements and properties to attributes?

c# - C#中的数组是引用类型,为什么它们充当值类型?

c# - GroupBy 根据条件返回 Count 和 Value

c# - 如何使用 LINQ 添加两条记录?

c# - 重载方法——引用和实例化对象的区别

.net - IDataErrorInfo 与 IValidatableObject?

excel - 使用Excel查找列中重复项的数量

excel - VBA 2016中的错误处理程序