Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7948901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:51:16+00:00 2026-06-04T01:51:16+00:00

We are having someone manually load weekly generated excel spreadsheets into SharePoint. I’m sure

  • 0

We are having someone manually load weekly generated excel spreadsheets into SharePoint. I’m sure there is a way to automate this. I don’t know a lot about SharePoint, and maybe it’s really as simple as just knowing the folder SharePoint is moving the files to and copying them directly there. Or maybe it requires some programming to get it automatically load new files put in a given directory into SharePoint.

Either way, I would just like someone to point me in the right direction here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:51:17+00:00Added an answer on June 4, 2026 at 1:51 am

    You will need to upload the file using the copy web service in SharePoint. I am not sure what version of SharePoint you are running but I am assuming 2007. Here is a sample project.

    public void UploadFile(string destinationFolderPath,
                          byte[] fileBytes,
                          string fileName,
                          bool overwrite,
                          string sourceFileUrl,
                          string lastVersionUrl)
    {
    
    List<Sharepoint.FieldInformation> fields = new List<Sharepoint.FieldInformation>();
    Sharepoint.FieldInformation fieldInfo;
    
    fieldInfo = new Sharepoint.FieldInformation();
    fieldInfo.Id = Microsoft.SharePoint.SPBuiltInFieldId.Title;
    fieldInfo.Value = "New title";
    fieldInfo.DisplayName = "Title";
    fieldInfo.Type = YetAnotherMigrationTool.Library.SP2007.Sharepoint.FieldType.Text;
    fieldInfo.InternalName = "Title";
    fields.Add(fieldInfo);
    
    string[] url;
    if (string.IsNullOrEmpty(destinationFolderPath))
        url = new string[] { string.Format("{0}/{1}/{2}", _siteUrl, _name, fileName) };
    else
        url = new string[] { string.Format("{0}/{1}/{2}{3}", _siteUrl, _name,    destinationFolderPath, fileName) };
    Sharepoint.CopyResult[] result;
    
    Sharepoint.Copy service = new Sharepoint.Copy();
    service.Url = _siteUrl + "/_vti_bin/Copy.asmx";
    service.Credentials = new NetworkCredential(Settings.Instance.User, Settings.Instance.Password);
    service.Timeout = 600000;
    
    uint documentId = service.CopyIntoItems(sourceFileUrl, url, fields.ToArray(), fileBytes, out result);
    }
    
    public void SetContentType(List<string> ids, string contentType)
    {
    ListsService.Lists service = new YetAnotherMigrationTool.Library.SP2007.ListsService.Lists();
    service.Url = _siteUrl + "/_vti_bin/Lists.asmx";
    service.Credentials = new NetworkCredential(Settings.Instance.User, Settings.Instance.Password);
    
    string strBatch = "";
    for (int i = 1; i <= ids.Count; i++)
    {
        strBatch += @"<Method ID='"+i.ToString()+@"' Cmd='Update'><Field Name='ID'>" + ids[i-1] + "</Field><Field Name='ContentType'>"+contentType+"</Field></Method>";
    }
    XmlDocument xmlDoc = new XmlDocument();
    XmlElement elBatch = xmlDoc.CreateElement("Batch");
    elBatch.SetAttribute("OnError", "Continue");
    elBatch.SetAttribute("ListVersion", "10");
    elBatch.SetAttribute("ViewName", "");
    elBatch.InnerXml = strBatch;
    
    result = service.UpdateListItems(_name, elBatch);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hope someone can help me out with this problem I am having. I just
I am having a problem with LINQ and I was hoping someone could explain
I'm having some strange drawing artefacts that I'm hoping someone might be able to
I'm having trouble groking something in Linq - maybe someone can give me some
I hope someone can help here, we're having an incredibly annoying time with Visual
Having trouble finding an explanation in the docs, would someone be kind enough to
Can someone please explain to me @MapsId in hibernate? I'm having a hard time
I was hoping someone could help me with a little issue I'm having trouble
I hope someone here can help me.. I am currently having a small issue
I am having trouble efficiently selecting the information I need to display. Hopefully someone

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.