I need a free library (or not too expensive) for .NET to work with the excel document. I need to read data, modify, save and add charts into the document.
Or in another way, I need a free l开发者_如何学编程ibrary for creating and inserting charts into the excel document (only for charts).
I have found FlexCel and SmartXLS, but FlexCel doesn't support the charts (can't create), while SmartXLS has a small functionality.
Office do not installed on server. Should support 2003 Office too.
Thanks for any help.
You should be able to do what you want using Open XML, take a look at the following online article:
Creating Documents by Using the Open XML Format SDK 2.0 (Part 2 of 3)
The theme of this scenario is document assembly and involves creating a file based on external data sources, such as other files or databases. In this scenario, you are a developer for a fictional company named Adventure Works. This company stores all sales information in a database. Currently, the sales team uses Excel to connect to the database manually to retrieve the latest sales information. Your job is to create a report generation tool that automatically retrieves data from the database, imports it into Excel, and creates a report with a chart. The Sales team will run this solution on the report server in overnight batches, so there is a strict requirement that they cannot use the Excel application client.
http://msdn.microsoft.com/en-us/library/dd452407(office.12).aspx
It outlines using template documents. It doesn't generate a chart from scratch, but it is almost exactly the scenario you outlined above.
Edit: Found another question that provides an array of answers: Create Excel (.XLS and .XLSX) file from C#
精彩评论