LtrlMsg.Text = "Please select a valid Excel File" Private void UploadExcelFileToSharePointList() / Uploads the excel file to share point list. Map.Add(1, "Employee ID") // First parameter is the column Index in Excel Sheet and Second Param is SharePoint List's Column Name (Display Name ) / Maps the SharePoint List column with Columns in Excel File. The below code snippet contains the functions which upload and download excel data Double click the package file in the projectģ.4 Click the Source Path button and browse and select the dllģ.5 Select Web Application as the deployment Targetģ.6 As EPPlus does not require any Safe Control entries, leave the other options to default and click OK to close the window.Īpart from Upload and Download functions, I have added a Column mapping method, that returns a Dictionary containing column index in Excel sheet as Key and its corresponding column name in SharePoint list as Value. Add reference to EPPlus dll in the projectĪdding 3rd Party (External) dlls to SharePoint 2013 WSP packageģ. ascx file of Visual WebPart to design the UIġ. Open up the Visual studio and create a new Empty SharePoint ProjectĪdd a new Visual Web Part and place the below code in. (Have renamed the default “Title” column to “Employee ID") Then create a SharePoint List named as Users with 3 columns. To begin with create an Excel file as shown below For more details on EPPlus check out its project page in codeplex. It’s one of the most popular Excel processing library available with extensive set of features and functionality. This post contains downloadable source code for both SharePoint 2013 and SharePoint 2010ĮPPlus is an Open XML based Excel processing library built on c# and is available for download in codeplex for free. In this blog post I will be discussing the steps involved in Excel Upload and Download (Export and Import of Excel Data) For SharePoint List Items with EPPlus in SharePoint 2013.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |