Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Want to improve this question?
Update the question so it focuses on one problem only by
editing this post
.
Closed
2 years ago
.
This is going to be more of a opinion question because I can't find any answer on Google or any SME's within my company that really have a opinion on this.
I wasn't sure if a opinion question is appropriate, so if its not please feel free to delete this, ban me or whatever the rules may dictate.
I'm work on a large set of very old Workbooks that are used for math calculations, these are not used in Production they are for check the results of the Production service. The Workbooks are very old (some 12+ years) and are now what I would call a 'mess' from the last decade of patching/fixes.
I've been researching Handsontable (
https://handsontable.com/
) a JS library that provides a spreadsheet interface like Excel that would handle all of the setting of the values of the cells etc... Then use Python (or Java if the company prefers for use J2EE) to do some of the heaver calculations (data lookup and projections) on the server side, or client side, I feel that just moving from VBA and Excel itself will provide a performance boost which Operations would just love.
I feel that the initial work would be a lot of hours, but I believe that I can create a common set of library's either in JS/Python/Java that will once completed reduce a lot of the re-coding that would need to be done on the VBA to JS/Python side as 80% of the VBA is common financial formulas.
My fear is that if we continue on the path with the current Workbooks in another 2-3 years they will become completely un-maintainable, alot with the fact that with VBA we don't have proper version control or the use of modern automated code review tools which we can benefit from by using newer technologies and in the long wrong will, hard work aside will prove to be the best option for our developers now and for my future colleagues.
If this question is ok by the rules and moderators, does anyone have any opinion on this? Is this worth while? Is it a waste of time?
Note: I'm not a manager, director or anyone with the power to make a decision as proposed above, I'm just a developer that feels I.... We can do better.
Thank you for your time.
–
–
–
–
–
So this may not be the answer for everyone, but I'm going to give you what we decided to invest time in first since this method was already used on another application to move it from a an old language to Java.
We have found several opensource projects online for the conversion of VB/VBA code to Python.
Examples:
http://vb2py.sourceforge.net/
https://pypi.python.org/pypi/vb2py
Once we have the Python code working using the native package to allow MS Interop access we will begin to refactor the Python code into a Django project (this choice isn't firm, but its my preferred choice; <3 Django) including creating the wrapper models for DB access. We feel we can make a wrapper for the MS Interop part to allow it to run as a Django project.
The plan in the end is to have the Django project act as only a REST Web Service for doing the 'heavy math/calculations' functions to Python and also could be on a much more powerful server increasing performance all around. This REST Service would answer calls from a Handsontable (
https://handsontable.com/
) JS Spreadsheet with the required plugins to handle all the current Excel formulas so we can do a direct 1:1 copy of our cell values/styles (convert Workbook to xlsm makes all the data stored as XML) to a Handsontable 'layout array'; which I think we will put in a DB. So in the end we have now given out Workbooks 15+ years of life and have removed Excel from the equation all together.
The current (mine) reasons for using Django are:
Independent Django packages makes reducing reduent code easier (I know this could be done with just pure Python but I feel its a good reason to put in my answer for others)
Easy to implement a Web Service using one a few very popular REST packages.
There are others but I believe everyone will get my points.
And the reasons for Python:
Runs on Linux, running VBA Macros server side requires Windows (bad: VM Cost when compared to Linux and less OS overhead).
Very easy to learn (I feel anyway)
Custom method decorators will make apply such things as standard interests rate to the return amount of a method without needing the interest rate code in the actual function that calculations amounts (as an example)
Thanks