A client has an excel sheet they use internally for managing listings. I had created a nice css styled table and they were copying and pasting info into my html table.
However, they're finding this very time consuming as pre-modx they were using Adobe Contribute and could copy and past large selections of the Excel sheet into Contribute and it would strip out the dodgy html and formatting and convert it to a html table.
Im looking into alternative ways of getting this data into a MODX recourse either such as saving excel as html table and then pasting table into resource
Is there any other way to do this. IE have them upload a excel file via the manager and use some inbuilt MODX script to render the excel sheet as a table?
Just fishing for ideas at the mo. Many thanks
...
-
☆ A M B ☆
- 1,780 Posts
My thought is that you'd convert the client to saving as .csv output from Excel, and then upload .csv to a mySQL custom database in MODX. Either with phpMyAdmin or actually, the importX package would do the trick.
Then, grab a pot of coffee and dig into xPDO and Custom DB tables at
http://bobsguides.com/custom-db-tables.html for the output into your resource.
There are some PHP classes out there that will read and parse Excel files, so in theory, you could write a snippet that would pull the current data directly into a MODX page with no importing or exporting. Here's one:
http://phpexcel.codeplex.com/.
That way the client could continue to manage the data in Excel and the MODX page would always be current.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
I may be missing something here, but I get my client to paste Excel straight into a RichText box, using the 'Paste from Word' function. They need to strip out the file name after it's done, but it generates a nice HTML table of data, that I can style accordingly.....
Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86