Posts

Showing posts from February, 2020

SharePoint CSOM to Create Folders and Sub Folders based on Excel Data

Contents: 1. Reading data from the Excel sheet. 2. Connecting to SharePoint Online Site & Checking the SharePoint list is available or not. 3. Creating the SharePoint Library Folders and Sub Folders. 4. Conclusion. 1. Reading data from the Excel sheet: a. Open Visual Studio, Select New Project Creation and Select C# Console application and provide the appropriate Solution name. b. First add the required references like below.     I . using Microsoft.SharePoint.Client;     II. using System.Configuration; (Used to read the data from the App.config file)     III. using Microsoft.Office.Interop.Excel; (Excel supported file reference)     Note: If above references and not able to add please install the references from the NuGet Package  Manager Console. To Read the values from the App.config file use the below  and declare all the fields globally for re-usability.                 public   static   string  userName = ConfigurationManager.AppSettings[ "Username&qu