I have an excel file that has macro enabled VBA. It has a button that will trigger the VBA for my excel. I was just wondering if it is available to trigger a VBA in Laravel app. I have like an upload button in laravel but when i click it, it will first trigger the button in excel that triggers the VBA then it will read the upload excel function. Do you think it is possible? And how?
相关问题
- Laravel Option Select - Default Issue
- Excel sunburst chart: Some labels missing
- Laravel 5.1 MethodNotAllowedHttpException on store
- Laravel - Implicit route model binding with soft d
- Error handling only works once
相关文章
- laravel create model from custom stub when using p
- send redirect and setting cookie, using laravel 5
- How to send parameters to queues?
- Bcrypt vs Hash in laravel
- Get column data by Column name and sheet name
- Laravel: What's the advantage of using the ass
- programmatically excel cells to be auto fit width
- Unregister a XLL in Excel (VBA)
Well as long as using Internet Explorer you can use JavaScript on your button to call a macro:
And using this function:
Then you need to wait until the macro is finished and trigger the upload event with JavaScript. Not sure about how we can detect that the macro has finished. Probably the easiest way would be to have one button to trigger the macro and then let the user click another button for uploading when the macro finished.
Another solution could be having a link that opens the file and it runs a macro on the
Workbook_Open()
event: Open excel file through normal html link. So the user needs to click that link before he can use the upload button.