I’m not familiar with Tableau but it appears to create on-screen tables. I’m not sure where Tableau gets the data to fill the table. I’ve asked in the Tableau support section of the forum so, hopefully, we’ll have an answer soon.
If you wanted to put a "bounty" on development of your snippet. This would be the place to do it:
http://modxcms.com/forums/index.php/board,224.0.html
I’m getting closer to understanding what you want but still have a few questions. It sounds like your users could upload CSV files (and, yes, they’re easily saved from Excel).
The big question is whether you want to accumulate, combine, analyze and/or archive the results. Another important question is whether you can absolutely count on them all being in the same format (same fields in the same order).
If you just want to create a new table to display for each one uploaded and you know the number of field and their order, it should be fairly simple.
If you want to create new tables which combine existing data (e.g. "show me the results for a particular horse in all events"), it gets more complicated.
If you can’t count on knowing the field count and order, it’s still doable but, again, more complicated, especially if the users are not all using the same software.
Here are some approaches:
1. In the simplest scenario, you could just save each uploaded CSV file and later create the web page from that file on the fly.
2. A step up from that would be to have the user fill out a form on the upload page (date, location, event title, etc.) and save the file to disk and the form data and filename to the MODx DB. You’d then query that DB table to get a menu of events. When the user selected one, you’d build the web page from the DB data and the saved file.
3. If you’re really ambitious, you’d have the user act as in approach 2, but you’d save everything in the database. This would allow you to add various bells and whistles later, such as a table for a particular horse or stable or venue, results for a particular time frame, performance graphs, etc. This would mean some serious planning of the database structure because once any data is entered, it’s a lot of work to change things.
You might also want some validation of the form contents and some custom code to check the validity of the uploaded filed.
The one thing I can tell you for sure is that the more time you spend figuring out exactly what you want now, and might want in the future, the fewer massive headaches you’ll have later. Down the road, you can count on your users saying, "Couldn’t you just add x?" It will appear to them as a trivial task but, if the design isn’t prepared for it, trying to add it will drive you nuts.
Hope this helps.
Bob