Answer the question
In order to leave comments, you need to log in
php integration with excel macro?
There was a need to integrate a Laravel site with a program written in excel. This is the first time I've met with this, so I don't understand what to do at all.
The program is an estimate calculator, which, depending on the parameters substituted, gives the final price of building a house.
I read about the PhpSpreadsheet library, but I did not find in the documentation how to work with macros.
The program looks like this:
Screenshot
That is, you just need to pull the program to excel at the request of the user on the site, substituting all the necessary parameters, and return the final price.
Help me please!
UPD: The option to "rewrite" the code will not work for me. The program can be updated by developers, it will simply be impossible to support all this, given that the program is not the smallest
Answer the question
In order to leave comments, you need to log in
1. In the macro itself, add sending data to your application.
1b. If not all users of the macro can be trusted, then instead of sending from the macro, you can return the result of the macro in JSON, which the user himself will insert on the site.
2. About how we launched real MS Excel in PHP ...
3. Use libXL , but it's in C ++ and there seem to be no wrappers for php.
4. Instead of the recipe from option 2, you can use OLE and run a special php script from under Windows and manage Excel.
Convince "developers" to abandon the technologies of the last century and make an online calculator. With the API, if anyone else is using it. In a year, they themselves will be grateful to you for this evolution, so blackmail and torture can be used to convince them.
I dealt with a similar task, but there all the business logic of calculations was in stored procedures / functions in the database.
The web application and macros just accessed them.
Not your case?
Can you be more specific about what kind of integration we are talking about? You will most likely need to rewrite the macro in php, and get the data for it using PhpSpreadsheet. Its developers abandoned the hemorrhoids with complex macros and did the right thing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question