Jump to content

Long shot but....


Sparks

Recommended Posts

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

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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)

:erm:

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy , along with dressing your husky as a unicorn on the first Thursday of each month