Scope:
I am generating automated reports using excel, but since we have restrictions on our server, we can't install Excel.Interop
or use any COM
object to perform such action.
We have been using EPPLUS as our main helper on this task but it has some serious restrictions when it comes to more intricated things such as PivotCharts
and Macros
.
We have just finished the project, missing only the PivotCharts
since EPPLUS has no support for them.
Question:
How can we :
A) Write Macros to a .xlsm
file? (We could write one named "Auto_Open" so that excel would run it uppon opening, creating the charts and stuff)
OR
B) Run a macro within our code to generate those charts after putting all the needed data there?
Not using Excel.Interop
is a must at this moment. We are open for some suggestions such as
SpreadsheetGear and EasyXLS, but we can't find any sample or piece of code that actually shows how to Write or Run macros.
Thanks in advance