I've got a report being exported as .csv
, and I need to offer two more formats of the report - .xlsx
and .pdf
, with added headers/footers/images.
我有一个报告导出为.csv,我需要提供另外两种格式的报告 - .xlsx和.pdf,添加页眉/页脚/图像。
Originally, my plan was to use Microsoft.Office.Interop.Excel
to open the .csv
, modify it with EPPlus
to add the header/footer/logo, and save it as an .xlsx
file, then export it as a .pdf
but the application is running within IIS, and automating office server-side is not recommended or supported.
最初,我的计划是使用Microsoft.Office.Interop.Excel打开.csv,用EPPlus修改它以添加页眉/页脚/徽标,并将其保存为.xlsx文件,然后将其导出为.pdf但是应用程序在IIS中运行,不建议或不支持自动化办公室服务器端。
1) Are there any free for commercial use tools for opening .CSV files and saving them as .XLSX?
1)是否有免费的商业用途工具用于打开.CSV文件并将其保存为.XLSX?
- EPPlus is the best option for this, as I can open CSV files, edit them, and save as Excel, which meets my requirement.
- EPPlus是最好的选择,因为我可以打开CSV文件,编辑它们,并保存为Excel,符合我的要求。
2) Are there any free for commercial use tools for exporting an Excel .XLSX file to .PDF?
2)是否有免费的商业用途工具将Excel .XLSX文件导出到.PDF?
3) Is there a tool that can do both?
3)是否有可以兼得的工具?
2 个解决方案
#1
5
To read csv files very easily and model based you can use filehelpers.
要非常轻松地读取csv文件并基于模型,您可以使用filehelpers。
http://www.filehelpers.net/
And to create excel files you can use epplus which is really good:
要创建excel文件,您可以使用非常好的epplus:
http://epplus.codeplex.com/ EPPlus is a .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx). GNU Library General Public License (LGPL)
http://epplus.codeplex.com/ EPPlus是一个.net库,使用Open Office Xml格式(xlsx)读取和写入Excel 2007/2010文件。 GNU图书馆通用公共许可证(LGPL)
To create pdf file you can use PdfSharp
要创建pdf文件,您可以使用PdfSharp
http://www.pdfsharp.net/Licensing.ashx
http://www.pdfsharp.net/Licensing.ashx
PDFsharp and MigraDoc Foundation are published under the MIT License.
PDFsharp和MigraDoc Foundation在MIT许可下发布。
See the PDFsharp License. See the MigraDoc Foundation License.
请参阅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
PDFsharp和MigraDoc Foundation是开源的,免费使用在您的应用程序中复制,修改和集成PDFsharp和MigraDoc Foundation的源代码,不受任何限制。这也适用于商业产品(包括开源和封闭源)PDFsharp和MigraDoc Foundation将保持开源,即使在遥远的未来也可以免费使用
#2
2
To work with post-2007 excel files (.xlsx), I highly recommend ClosedXML.
要使用2007年后的Excel文件(.xlsx),我强烈推荐使用ClosedXML。
#1
5
To read csv files very easily and model based you can use filehelpers.
要非常轻松地读取csv文件并基于模型,您可以使用filehelpers。
http://www.filehelpers.net/
And to create excel files you can use epplus which is really good:
要创建excel文件,您可以使用非常好的epplus:
http://epplus.codeplex.com/ EPPlus is a .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx). GNU Library General Public License (LGPL)
http://epplus.codeplex.com/ EPPlus是一个.net库,使用Open Office Xml格式(xlsx)读取和写入Excel 2007/2010文件。 GNU图书馆通用公共许可证(LGPL)
To create pdf file you can use PdfSharp
要创建pdf文件,您可以使用PdfSharp
http://www.pdfsharp.net/Licensing.ashx
http://www.pdfsharp.net/Licensing.ashx
PDFsharp and MigraDoc Foundation are published under the MIT License.
PDFsharp和MigraDoc Foundation在MIT许可下发布。
See the PDFsharp License. See the MigraDoc Foundation License.
请参阅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
PDFsharp和MigraDoc Foundation是开源的,免费使用在您的应用程序中复制,修改和集成PDFsharp和MigraDoc Foundation的源代码,不受任何限制。这也适用于商业产品(包括开源和封闭源)PDFsharp和MigraDoc Foundation将保持开源,即使在遥远的未来也可以免费使用
#2
2
To work with post-2007 excel files (.xlsx), I highly recommend ClosedXML.
要使用2007年后的Excel文件(.xlsx),我强烈推荐使用ClosedXML。