locked
Importing data into a SharePoint List and a separate SQL reporting DB RRS feed

  • Question

  • Hi

    I am looking for a solution to do the following. 

    I have a spreadsheet that has 50 columns, around 30 of those need to be added to a SharePoint list while the other 20 get added to a separate reporting DB. The spreadsheet columns are fixed so the data is in the same place each time, but note that the data for SharePoint and Reporting are intermixed (e.g. column 1,2,3,4,8,15,26 are SharePoint and 5,6,7,16 etc.. are Reporting). 

    The spreadsheet will be saved as a csv for importing. 

    I  have found a scripts that allows for importing to a SharePoint list or to SQL but I need is one that can do both based on the CSV, logging and confirmation email would be nice to have as well. 

     

    • Moved by Bill_Stewart Monday, October 2, 2017 10:05 PM This is not "scripts on demand"
    Thursday, August 31, 2017 10:48 AM

All replies

  • Hi Paul,

    I hate to be the bringer of bad news, but this question is beyond the scope of this forum. You'll have to work this out for yourself, write your own script and get back to us with specific issue you are facing. Those we will be happy to help you with.

    That said, some general hints:

    • Import-Csv can read csv files
    • Select-Object can select properties (columns) by name, irrespective of order
    • ConvertTo-Html allows for readable reports in html emails
    • Send-MailMessage will send mail
    • Get-Help will tell you how to use a command. Example uses:
      Get-Help Send-MailMessage -Detailed
      Get-Help Select-Object -Examples

    Cheers and good luck with your script,
    Fred


    There's no place like 127.0.0.1

    Thursday, August 31, 2017 11:34 AM
  • There are examples in the Gallery.

    Please read this first: This forum is for scripting questions rather than script requests  
    Also find scripts here: http://gallery.technet.microsoft.com


    \_(ツ)_/

    Thursday, August 31, 2017 4:57 PM