开发者

Modify/Read/Write existing Excel/PDF document with .NET libraries

The issue consists of two parts:

  1. What are the best .NET libraries to modify (read/write) existing excel document (should be work with Excel 2003)?

  2. What are the best .NET libraries to modify (read/write) existing pdf document?

They should be able to create new document too. It's bet开发者_StackOverflow社区ter if they are free (open source) or not too expensive.

Thanks in advance :)


For PDFs: iTextSharp. It's free and it's not hard to learn.


Regarding Excel you might not need a library. If you've got Excel installed you can automate it to edit the document, or otherwise you might be able to do what you need just by accessing it via OLEDB to read/write data.


I evaluted a number of Libraries in this Post for reading Excel files. My preference was a library called FlexCel as it was very easy to use, quite cheap compared to the alternatives. We've been using it without any problems, has good support and frequent updates.

I believe it has some sort of PDF generation from Excel spreadsheets, I'm not sure if thats what you're after.

Other alternatives are Aspose, they offer an Excel and an Adobe PDF library. They are quite a bit more expensive though.


Look no further for the Excel part:

Create Excel (.XLS and .XLSX) file from C#

Creating Excel spreadsheets .XLS and .XLSX in C#


Try Pdf Sharp ==> http://www.pdfsharp.net/

Its all open source and free under the MIT license(So free for commercial use too)

The API is similar to GDI+, Also, they have something called MigraDoc which can be used to create a document in memory and then render it to RTF, XPS, or PDF.


I decided to use FlexCel for .net - not free but not expensive too. API is not very comfortable so my advice to use the documentation of this library and support pretty good. All features this library can do except charts (but flexcel team promise to add this in the nearest release).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜