Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi All
At the moment I have set up table manager in drupal 5 so that employees can add sales figures to a central sales sheet, which is working fine. Once the sheet has been completed I would then like the ability to export the completed sheet back to a CSV file on the local machine so that it can be used in our accounts department with excell to complete our audit process.
Does any one know if this process has been done before???
Would the feature be difficult to achieve???
Thanks, Matt
Comments
Comment #1
pobster CreditAttribution: pobster commentedIt's already a feature of the 6.x branch, but I'm afraid I'm not going to add anything to the current 5.x branch as it's not a *real* branch, it's just a messy hack on the 4.7.x branch and as such, is very, very old and outdated... I am planning on downgrading the 6.x branch to 5.x when I'm done with it but I wouldn't hold your breath as for how long that'll take - none of this is a priority for me...
...There's a really awful patch you can apply somewhere in this issue queue which allows for some sort of csv exporting. It's completely overkill though in that it's attached to the display function which is already complicated enough as it is (!) The current code for 6.x can easily be converted to work with 5.x (it's all the same principal) so if you've anyone who knows even just a little php - it'll be quite simple for them;
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/tablemanage...
Pobster
Comment #2
rivena CreditAttribution: rivena commentedjust subscribing because I was looking for this just now.
Oh, and just a rudimentary suggestion, but with your data, can you just copy and paste from the website?
Anisa.
Comment #3
pobster CreditAttribution: pobster commentedIf you want this functionality then I'll do it tonight - as ever you only have to ask...
And yes you can just copy and paste a table into Excel (use "Paste Special" then specify 'unicode text') works fine... The export function I have works better though, it saves it as a proper csv file.
Pobster (I'll answer your other email in a bit, I've just woken up!)
Comment #4
shmatty29 CreditAttribution: shmatty29 commentedHi Pobster
Many thanks for the reply - look forward to seeing your fix. Had a look through and tried to modify the code from 6 to 5, but i guess i just dont know enough yet.
Thanks again.
Matt
Comment #5
rivena CreditAttribution: rivena commentedWell, if that's all it takes! ;) I don't need it for testing anymore, but you know I love tablemanager. Being able export may come in handy for my members, especially if I import in all the checklists.
Anisa.
Comment #6
pobster CreditAttribution: pobster commentedYou *know* you only have to ask ;o) And apologies, I didn't get home till 1am last night - so I did it this morning instead...
...Never one to create patches... Here's what to do (I'll submit it to the repository once it's been tested);
Pobster
Comment #7
rivena CreditAttribution: rivena commentedLate night? The Cyprians again, I see. ;)
Would you like me to test it on the test site?
(I'm writing a howto for the checklists...for the third time. I think it may be jinxed, the browser window suddenly closes every time I try it. ;p)
Anisa.
Comment #8
pobster CreditAttribution: pobster commentedPlease... Would appreciate anyone testing it! :o) Sorry for not getting back to you yet by email, things have been ultra manic here since I got back! Plus that and I have absolutely no idea about your problem - so I've been trying a couple of things out when I get the chance... And I'm still none the wiser as of yet :o(
Pobster
Comment #9
rivena CreditAttribution: rivena commentedI've forgotten what I asked you, but I'm sure it was something I was really stuck on... oh, was it the fuzzy date thing? I don't want anyone to write code for it, just a kind of, this functionality isn't available yet, what can I do in the meanwhile? I really want that released set thing. Writing this HOWTO make checklists thing is killing me.
As far as your export thingy, I had to run update.php before it showed up properly. Then, it actually worked pretty well! I was impressed. No errors on my screen, but a couple of fixits. 1) biggie, I didn't notice this at first, but when I open it up in Notepad instead of Excel first, it all runs on one line. Excel didn't seem to have any problem with it though, so not sure what's up with that. 2) you have to do that thing where you select the table not just by table number but also by table title. I did like the default save options (you have Table-1 or the table title if it exists, nice touch.)
Anisa.
Comment #10
pobster CreditAttribution: pobster commentedYeah it was the fuzzy date thing and well... I've not really ever used CCK so I'm a bit puzzled on what to suggest... I'll look into it a bit more, hopefully I'll come up with something? Fingers crossed!
Yep - sorry should have mentioned that you'd need to clear your cache (which is what happened when you ran update.php) that was to be expected. Also, Notepad doesn't tend to format non-text files very well, on more than a hundred occasions I've opened up module files via ftp (which open in Notepad) only to find they're all on one line as well... Not helpful... There's nothing you can do about it I'm afraid (Notepad-wise anyway, it's a throw-back to olden days anyway) you'll need to open it in Wordpad instead as it understands newlines better. As for the #2 request, I'm afraid that's a 6.x feature - it'll take a lot of hacking about to put it into the current 5.x branch I'm afraid! You'll have to wait until I backport HEAD... Which I'll do as soon as I get that bikini pic ;o)
Pobster
Comment #11
rivena CreditAttribution: rivena commentedAh, yes, I had forgotten that part of the thing. I only remembered that you had found some way to fix it.
Well, since I can't upgrade to 6 without a corresponding upgrade in all the major modules, and I really only use about 2 tablemanager tables, I'm afraid you're just going to have to live without.
Anisa.
Comment #12
pobster CreditAttribution: pobster as a volunteer and at ArcadeGeek LTD for Rackspace commentedClosing as D5.x is now unsupported.