Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Capture uploaded Excel Macro and apply to existing Workbook

I saw a post here saying that you support roundtrip on an Excel macro(s). I'm wondering where in the workbook object it is stored?

I need to apply a macro to a workbook because no combination of existing Excel functions (including the new Office365) will complete the kind of analysis and reporting I require within our application, as it requires grabbing a lot of information from several sheets before being able to calculate a response in the final sheet of the workbook.

I am currently using the code from your loading data example to analyze the object returned, in an attempt to locate the branch that might hold the Macro code, so that I can reproduce and attach it to the application in the appropriate spot.

A basic overview of the information is this:

  • sheet one has output values
  • sheet 3 has percentages (divide output by percentage to get input value)
  • sheet 4 has the time in days it takes to produce the output
  • sheet 5 is known input (less than 5% fill compared with output)
  • sheet 6 is where the macro would run to produce the projected input

The formula for the projected input requires backtracking a number of columns (based on the output date and time from sheet 4), where time periods in sheet 6 cover the beginning of production for the max time period.

The logic for any cell in sheet 6 reads something like this:

if (sheet4cell = sheet4max) { sheet1cell/sheet3cell }
else { sheet1cell (column - (sheet4max - sheet4rowMax) / sheet3cell (column - (sheet4max - sheet4rowMax) }

If there is now a way to add a macro in a more legitimate way, please let me know how. This is ASP.NET MVC with Ignite UI (RAZOR).