1

I have an existing populated list. Is it possible for users to add additional items to the list via an Excel upload? I have not seen any custom solutions for this functionality but I would consider anything OOTB or custom (javascript) that may exist. My users do not like copying and pasting from Excel via the 'quick edit' view and have asked for a different solution. Any insight would be greatly appreciated. Thanks!

2 Answers 2

1

I see two ways to achieve this. First would be a workflow system as SharePoint workflow or Nintex Workflow. But if you had this you would have taken this way already I think.

Create one single destination list (if not already done). Then create a new SharePoint list out of the first Excel file you want to import. Now you got two SharePoint lists.

Use the following script to import all items from newly imported list to your destination list. Afterwards you can delete the list created from Excel and repeat importing Excel files to new lists and copy the items by script afterwards.

$WebURL = "https://siteurl"
$SourceListName = "FromExcelList"
$TargetListName= "DestinationList"

#Get Lists
$web = Get-SPWeb $WebURL
$SourceList = $web.Lists[$SourceListName]
$TargetList = $web.Lists[$TargetListName]

# Get Columns
$SourceColumns = $sourceList.Fields
$SourceItems = $SourceList.items
foreach ($SourceItem in $SourceItems)
{
 $TargetItem = $TargetList.AddItem()
 $TargetItem["Title"] = $SourceItem["FieldFromExcel-1"]
 $TargetItem["SecondField"] = $SourceItem["FieldFromExcel-2"]
 $TargetItem.update()
}

This is a PowerShell script. You can save it to a text file and save the filetype to ps1. Be sure to change the first the lines to your environment. Then open up a management shell on one of your SharePoint servers and run the file.

The script will copy all items from list "FromExcelList" to your "DestinationList".

Please give feedback/mark as solution if this helps.

2
  • thanks phil. i have access to SP designer workflows. you mentioned that as the first solution. I've built some workflow in the past, but I don't know how I'd add items to a list view an excel upload with a workflow. would you mind giving me a rough run-down of how this could be accomplished? i really appreciate it!
    – loady toad
    Jun 26, 2018 at 16:21
  • My approach with workflow would have been nearly the same. I would have created a list out of the excel file by importing it as a list (as done in my suggested answer). Then I would have created a SharePoint/Nintex Workflow to read all items from a list with that name and create this items in your destination list. After importing the source list I would have deleted the source list, created a equaly named list from the next Excel file, rerun the workflow, delete the source list again and so on. Its some manual work but better than copying to quick edit. Would prefer PowerShell solution.
    – PhilFancy
    Jun 27, 2018 at 5:38
2

How about using access? You can connect to a SP list and update that way!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.