92 points · by gmac · 11y ago · 59 comments
It's ancient and flawed but it converts a SpreadsheetML ( https://en.wikipedia.org/wiki/SpreadsheetML ) aka "Excel 2003 XML" spreadsheet to PHP in real time.
There is a VERY complicated configuration tool for a major steel company that runs on this still, last I checked anyway. I left that job ~5 years ago. I've done a few small updates since then for them, but not much.
It was nice though because it allowed the company to just submit a new Spreadsheet and their tool would automatically update. I was very proud of it at the time. Haven't had reason to maintain it though, but it works much faster than other tools that do similar for PHP.
We've saved ourselves a lot of hassle implementing application integration solutions by outsourcing domain-specific number crunching/mapping to a spreadsheet in our integration platform. It enables us to treat the customers' business rules as a black box - feed inputs against named ranges and read out named ranges (https://developers.flowgear.net/kb/Node:Excel_Workbook).
I used this approach regularly about 4 years ago in my previous job to interact, query,... with data stored in "excel databases".
So, while I'm not the parent commenter, my suggestion would be to have a windows server that runs both my interface software, and excel. You load the workbook, populate input fields, let excel do the processing and query output fields/workbooks/...
Of course the excel sheet could also contain VBA code actively pulling out data from a DB, heck it could even call code in custom shared libraries. But I doubt that passing around workbooks full of code amongst it illiterate users will do any good. The less magic they contain outside of stock cell formulas the less chance of users messing up the computation.
If you want to play with it, look up the win32 modules shipping directly with ActiveState's python distribution.
If you need to invoke the same sheet repeatedly, you can build a cache of range output values keyed on a hash of range input values. This enables you to bypass Excel for a state that you've previously seen.
It's also pretty easy to inject and execute script (as opposed to invoking existing scripts) - that deals with the problem of users being able to see or edit VBA.
http://docs.activestate.com/activepython/3.3/pywin32/html/co...
LibreOffice nowadays works pretty well with excel spreadsheets. It also means that as LibreOffice improves so does my excel sever. I'm also working in the GNU/Linux world so this is a great solution for me.
Worked wonderfully apart from the memory leaks :)
There are many things that could be improved in Excel. But Microsoft seems to have unstaffed all developpers from the office team and that product seems to be in maintenance mode. The only innovation in 10y is a button that enables to share a spreadsheet on facebook. Will be very popular in a corporate environment.
Ah, Ruby.
Use with caution.
Everyone looks down on them, but spreadsheets really are incredibly functional, and a lot more accessible that most programming languages.
Ahhh. Corporate IT. I may miss it one day. But not today.
I know C/C++ works just fine on Windows, but the command-line tools on cmd.exe leave a lot to be desired.
That's especially valuable in this case because the kinds of organizations that have lots of business logic in Excel spreadsheets are unlikely to want to switch programming languages to take advantage of a tool like this. Given that automatically-generated code is likely to be ugly no matter what language it's written in, it makes sense to target the lowest common denominator that everyone can benefit from.
there might be some uses for non-technical users, but yeah... it's sort of madness to do this for a production service.
I had big plans for the project; the next step was to convert the models to JavsScript so they could be executed directly on the client. But, like most of my pet projects, this has remained a pipe dream.
Good luck with it!
Google Sheets was our primary tool for configuration and content authoring for way too long. Eventually, he added support for OOXML sheets, too. At some point, a long time later, we started migrating to TTL, and thank goodness for that.
The code was all open-sourced, by the way, but I'd rather not link it here because I don't really want this username associated with that company.
Any search clues? It sounds really interesting and I've been exploring the possibility of using spreadsheets as a widely understood authoring tool.
You have no idea, poor innocent soul... :(. I hope you won't touch excel-based databases, it's really awful...
I've had form templates sent to me in Excel because of the easy-to-use table layout controls. I've had games sent to me in Excel because VBA was so damn easy to program simple ideas in. I've had PoCs of algorithms sent to me in Excel because the graphical chaining of each step is so illustrative.
I've also seen the nightmare that haunts businesses who define their business logic through a bunch of interconnected Excel files. As an aside, this seems like an area ripe for "disruption" (remember when "disruption" was a bad word?), which is where tools like excel_to_code could probably make a large impact. If you could validate and test the entire business logic, as expressed in Excel files, you could reduce or eliminate the "Excel defined business rules" nightmare. If you can do this, there are thousands of SMEs that will be knocking at your door.
I personally don't use Excel for much, and I used to deride people who used it for "the wrong task", but I've recently had to swallow my pride, and accept that it's a serious power tool for most non-programmer people. I'd even go so far to say that it's the most successful "visual programming" tool out there. And by a long way.
You seem to imply that's not already the case (though many wish it wasn't)