The
free kalmstrom.com service
SharePoint PnP List Generator, creates new SharePoint
lists in a way that follows recommended practices. It is
also convenient to use the generator to import data to SharePoint.
Add all data together with values for the new list's content
type and site columns to the PnP Generator, and it will
create a PowerShell script for the list.
Copy the PowerShell code, paste it in Visual Studio Code
or Windows PowerShell ISE (depending om PowerShell version)
and run the script. Now the new list is quickly created
with all the data.
In the kalmstrom.com PnP List Generator, enter the
name of a content type group. It can be a new or an
existing group.
Enter the URL to the SharePoint site where you want
the new list to be created.
Select SharePoint version.
Select PowerShell version.
Select Parent content type.
Enter the name of the new content type you want
to create.
Enter the name of the new list.
Under Site Columns, type column names under the
Title cell, or copy and paste them from the existing
data source. Select the column types you wish to use.
Copy the rest of the data from the source. Select
the first cell under under List Data in the PnP Generator
and paste the data. Check that it looks good.
Click on Copy to Clipboard.
Run Visual Studio Code (PowerShell V7) or Windows
PowerShell ISE (PowerShell V5) as an administrator.
Open a new script and paste the PowerShell code
you copied from the PnP Generator.
Make any changes you prefer in the script.
Run the script. Now a new list will be created in
the SharePoint site you specified and all data from
the source will be added to the list.
Peter Kalmström, CEO and Systems Designer of kalmstrom.com
Business Solutions, shows the process in the demos below.
Peter uses data from an Excel lists, but you of course add
data from any table to the PnP List Generator, even data
from a SharePoint list that you are not satisfied with.
The first demo shows the PnP Generator as it looks now,
and Peter uses PowerShell version 7. The second demo was
created with an earlier version of the generator, which
only supported PowerShell version 5 and SharePoint Online,
and therefore no selection was necessary. Otherwise, the
process to fill out the generator is similar. However, PowerShell
version 7 is run and edited in Visual Studio Code, while
version 5 uses Windows PowerShell ISE.
PowerShell V7:
PowerShell V5:
Peter has a Title column in his Excel file. If you don't
have that you can rename the Title field in the PnP Generator
to something that fits the first column in your source.
Then the copy and paste will be quick and give a good result.
Learn more
Software that enhances SharePoint
Kanban Task Manager Visualize and co-operate on projects and tasks in SharePoint
and/or Outlook
Pivot Explorer Visualize and analyze list data in SharePoint
Templates Manager
Find, use, manage and distribute Office templates in SharePoint