Sparks Posted January 18, 2013 Report Share Posted January 18, 2013 has anyone ever, or does anyone know how to automatically upload a document to microsoft sharepoint 2010? i know you can do it manually through excel etc, but i want it so at a given time every day/week the file is automatically uploaded to sharepoint without any user interaction. also not as urgent but, does anyone know how to automatically export the output of an SQL query from an oracle database as a excel file? good luck! lol Quote Link to comment Share on other sites More sharing options...
Marc Posted January 18, 2013 Report Share Posted January 18, 2013 has anyone ever, or does anyone know how to automatically upload a document to microsoft sharepoint 2010? i know you can do it manually through excel etc, but i want it so at a given time every day/week the file is automatically uploaded to sharepoint without any user interaction. http://www.sharepointdiary.com/2012/04/how-to-programmatically-upload-file-to.html also not as urgent but, does anyone know how to automatically export the output of an SQL query from an oracle database as a excel file? good luck! lol You want to look at the excel interop library if you are looking to export to excel. Alternativly if the excel file is one that is already available (ie, you are exporting to the same file each time) then thing of importing from oracle via excel vba (can add to loading event of the excel sheet as a macro). Quote Link to comment Share on other sites More sharing options...
Sparks Posted January 18, 2013 Author Report Share Posted January 18, 2013 http://www.sharepointdiary.com/2012/04/how-to-programmatically-upload-file-to.html You want to look at the excel interop library if you are looking to export to excel. Alternativly if the excel file is one that is already available (ie, you are exporting to the same file each time) then thing of importing from oracle via excel vba (can add to loading event of the excel sheet as a macro). the thing is, it doesnt like credentials... i tried using powershell but just kept getting an error back from the server because of the credentials it will be the same excel file every time, it has to be completely automated, no user interaction at all. Quote Link to comment Share on other sites More sharing options...
Marc Posted January 18, 2013 Report Share Posted January 18, 2013 the thing is, it doesnt like credentials... i tried using powershell but just kept getting an error back from the server because of the credentials it will be the same excel file every time, it has to be completely automated, no user interaction at all. However assuming that the data only has to be there when someone opens the file, you just get it to fetch the data and format it accordingly when the file is opened. What doesnt like credentials? Sharepoint? Quote Link to comment Share on other sites More sharing options...
Sparks Posted January 18, 2013 Author Report Share Posted January 18, 2013 However assuming that the data only has to be there when someone opens the file, you just get it to fetch the data and format it accordingly when the file is opened. What doesnt like credentials? Sharepoint? what i want to do, run a script on the database once a week (job scheduled) export the output to excel automatically, then upload that file to sharepoint once a week... all without any user interaction. i wrote a powershell script, the sharepoint server just kept saying bad request. if i changed the credentials it says unauthorized. i think i have to run it from the sharepoint server itself which i dont think i will be able to, not allowed access... Quote Link to comment Share on other sites More sharing options...
Mollys Dad Posted January 18, 2013 Report Share Posted January 18, 2013 I don't have the access rights to do that either. Can't seem to find a 'non admin rights' way of doing it from S.P. but would be interested to hear if anything comes up Quote Link to comment Share on other sites More sharing options...
Marc Posted January 18, 2013 Report Share Posted January 18, 2013 what i want to do, run a script on the database once a week (job scheduled) export the output to excel automatically, then upload that file to sharepoint once a week... all without any user interaction. i wrote a powershell script, the sharepoint server just kept saying bad request. if i changed the credentials it says unauthorized. i think i have to run it from the sharepoint server itself which i dont think i will be able to, not allowed access... IMO I would state to the people who can give you that access that you cannot do your job without the correct tools to do so if Im honest m8. Way I would be going about what you stated above. Create a new service application project in C#/VB/Other Add references for excel interop Create the a new excel document in code Create a recordset object which contains the required data in your application Write the recordset out using excel interop Save the document Upload to sharepoint using shell as you already stated you were going to, however as you said you need to ensure you have the permissions Confirm document presence within sharepoint Move the saved exported excel document to an archive location (This way you have audit of what the program saved on any given day) Quote Link to comment Share on other sites More sharing options...
Mollys Dad Posted January 18, 2013 Report Share Posted January 18, 2013 IMO I would state to the people who can give you that access that you cannot do your job without the correct tools to do so if Im honest m8. Way I would be going about what you stated above. Create a new service application project in C#/VB/Other Add references for excel interop Create the a new excel document in code Create a recordset object which contains the required data in your application Write the recordset out using excel interop Save the document Upload to sharepoint using shell as you already stated you were going to, however as you said you need to ensure you have the permissions Confirm document presence within sharepoint Move the saved exported excel document to an archive location (This way you have audit of what the program saved on any given day) Quote Link to comment Share on other sites More sharing options...
Sparks Posted January 18, 2013 Author Report Share Posted January 18, 2013 IMO I would state to the people who can give you that access that you cannot do your job without the correct tools to do so if Im honest m8. Way I would be going about what you stated above. Create a new service application project in C#/VB/Other Add references for excel interop Create the a new excel document in code Create a recordset object which contains the required data in your application Write the recordset out using excel interop Save the document Upload to sharepoint using shell as you already stated you were going to, however as you said you need to ensure you have the permissions Confirm document presence within sharepoint Move the saved exported excel document to an archive location (This way you have audit of what the program saved on any given day) I've currently done most of this, but just need permission... Which to be honest I can't seem them giving me it as every project uploads to share point, if I bring it down, I'm screwed lol Sent from my GT-I9100 using Xparent Cyan Tapatalk 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.