I've server side automation to create some chart in excel using OpenXML. I
need
to export a chart from my report to an image and send it in an email. The
excel
libraries are not installed on servers so interop COM is not an option.
How can I
achieve this without using anything external dlls or anything? Suggestions
appreciated. thanks
Okay, let's deconstruct this question, because it's confusing a lot of
people. You say you have code running on a server that creates a chart "IN"
Excel. For most people here, that suggests that you are using the Microsoft
Excel EXECUTABLE to generate this chart, programmatically (i.e., via
Automation) in this case.
I don't think that's really what you mean, because you stated that "the
excel libraries are not installed on servers."
So I think what you mean is that you have some code that creates a file that
is NORMALLY USED BY EXCEL. Please note that an .xls[x] file is not "Excel,"
it is merely a file type that is associated with Excel.
Then you ask, "How can I achieve this without using anything [sic] external
dlls or anything?" Well, there's only one answer to that: write all the code
yourself! I don't think this was really your question, either. I think the
"external DLLs" you referred to meant "DLLs belonging to some commercial
application, like Excel."
I think what you're really really asking here is, "Is there any free
assembly out there which can read OpenXML spreadsheets and generate images
from the chart data embedded within them that will look just as good as
those generated by Excel?" And I think the answer is going to be a big NO.
More than likely there are several commercial offerings, but they aren't
going to be cheap.