# Shareoint Site Structure via Powershell and Excel

**URL:** <https://forums.powershell.org/t/shareoint-site-structure-via-powershell-and-excel/1464>\
**Category:** PowerShell Help\
**Created:** [December 31, 2011, 6:30pm UTC](https://forums.powershell.org/t/shareoint-site-structure-via-powershell-and-excel/1464 "2011-12-31T18:30:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![archives](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@archives](https://forums.powershell.org/u/archives)\
**Post date:** [December 31, 2011, 6:30pm UTC](https://forums.powershell.org/t/shareoint-site-structure-via-powershell-and-excel/1464/1 "2011-12-31T18:30:00Z")

</div>

by bronyx85 at 2013-02-07 01:16:24

> Hi,   
>   
> Can someone advise on how I can create a site structure in SP13 ONLINE site structure using a Excel spreadsheet.   
>   
> i.e. my site structure is on the spreadsheet, so what I would like to do is tell powershell to look at the SpreadSheet and create the site collections, sites, lists and libraries which are on that spreadsheet.   
>   
> Is that possible?  
>   
> Thanks

by DonJ at 2013-02-07 09:36:44

> Reading information from an XLS isn’t impossible, but it can be pretty tricky. If you could export that to CSV, it becomes much easier - PowerShell has an Import-CSV command, and that’d let you get the data into the shell.  
>   
> `$sites = Import-CSV sites.csvforeach ($site in $sites) { # refer to CSV columns like this: $site.name, $site.whatever, assuming # "name" and "whatever" are columns from the CSV}`  
>   
> You can then use the data to run whatever commands you need to.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:58pm UTC](https://forums.powershell.org/t/shareoint-site-structure-via-powershell-and-excel/1464/2 "2024-05-16T20:58:24Z")

</div>


