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
935
Capture uploaded Excel Macro and apply to existing Workbook
posted

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

Parents
No Data
Reply
  • 1080
    Offline posted

    Hello,

    Thank you for posting in our community.

    Currently, the excel library does not provide public properties or methods for the workbook macros. What I can suggest in order to see this functionality implemented is logging a new product idea. You can suggest new product ideas for future versions (or vote for existing ones) at https://ko.infragistics.com/community/ideas.

    Submitting your idea will allow you to communicate directly with our product management team, track the progress of your idea at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.

    Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. You can also link back to this thread for additional details.

Children