I've been using Microsoft COM model to prepare reports but it is slow and fails if server does not have excel installed. So I am moving to using OpenXML for creating reports from a server process that does a ton of other things as well.
I've a template that contains named ranges for data that I need to change or extend, named charts, named chart series, named worksheets, etc. All my formatting is contained in excel file and all I do in my server side process is populate the file with data.
These are the steps that I need to replicate using Excel OpenXML:
- Open an existing sheet and create a new sheet based on it.
- Get the worksheet by worksheet name
- Get the Named Ranges in that worksheet.
- Populate the Named Ranges from data and extend the ranges if required based on data set.
- Get Chart by Chart Name
- Get Chart Series by Series Title
- Set Chart series to the new range
- Export Chart to jpeg to be used in html.
- Save new File.
Is it possible to do these steps in OpenXML cleanly? Any examples will help me a lot. Or a light weight library that does this. Some of these 3rd party libraries are too big and are more useful in creating new sheets from scratch.
Any help appreciated.