josephjohn has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I have a requirement of uploading the excel files generated at the end of script processing to a sharepoint site. Has someone tried a similar activity or any thoughts for accomplishing this (in terms of what modules to use etc) would be helpful.

Thanks in advance as usual.

Regards
Joseph

Replies are listed 'Best First'.
Re: Sharepoint manipulation
by chargrill (Parson) on Jun 08, 2006 at 01:27 UTC

    With my brief experience with sharepoint, I recall being able to map a drive to the sharepoint 'attachments' directory (or equivalent) and being able to directly manipulate the filesystem that makes up sharepoint. IF you can do either map a drive or browse to the UNC, a simple file copy should work just fine.



    --chargrill
    $,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}
      I'd be wary of this. Sharepoint does an awful lot with its SQL server, and shoving files around outside the 'normal' interface has not always done what I'd like.

      Does josephjohn even have UNC access to the SharePoint file system? Lots of SharePoint portals have content managers for site trees (e.g., y'r h'ble ob't) who are outside the firewall and can't do anything with UNC or mapped drives.

      Just tried to upload files via UNC paths and it worked. Thanks a lot for the suggestion, chargrill.

      girarde, thanks for your suggestion on OLE too. i havent tried it, but will let you know the results if i get a chance.

Re: Sharepoint manipulation
by girarde (Hermit) on Jun 08, 2006 at 03:17 UTC
    I don't know how, or even IF, this can be done yet. SharePoint is more dependent on Win32 and IE than almost anything I can think of. There are many features of SharePoint that require IE 6 or higher to use, such as viewing a list in tabular form and (IIRC) uploading multiple files.

    That said, you may be able to use Win32::OLE to open and control an IExplorer object, especially if you are writing Excel files with Perl.

    Let me know if this works so I can steal your technique. :-)