1

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 library 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.

SchmerZ
  • 79
  • 1
  • 8

1 Answers1

2

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#

Community
  • 1
  • 1
Larry Smithmier
  • 2,711
  • 2
  • 23
  • 30
  • Hmm..not bad, but as I understand it will work only with the Office 2007 and later. Should support 2003 too. – SchmerZ Jun 07 '10 at 07:10
  • There is a compatability pack that allows earlier versions of Office to use the new formats: http://www.microsoft.com/downloads/details.aspx?FamilyId=941B3470-3AE9-4AEE-8F43-C6BB74CD1466&displaylang=en or there are several XLSx to XLS conversion tools: http://download.cnet.com/Batch-XLSX-to-XLS-Converter/3000-2077_4-10910569.html – Larry Smithmier Jun 10 '10 at 03:54