0

I have to import a CSV file into a list (put it in a tab). But this CSV will be updated (weel, in fact it will be regenerated), and I need SharePoint to refresh the list with new data.

I don't know if I must use Powershell or if there is an alternative way to do this.

And I don't know the frequency of refreshing, but I guess this is not the current problem.

Thanks in advance.

Nico

  • I'm currently having a look at this, and I think it is exactly what I want. Im testing it and come back for my feeling. Then I think I will have to use timer job. – Nico Apr 17 '14 at 8:57
  • as an alternate solution you can also edit your list in datasheet view and copy paste your columns from excel directly. – SharePointMan Apr 17 '14 at 9:02
  • @Ashish I'm not sure I understand what you mean. With powershell, I'm now able to create the list if it doesn't exist. I'm looking for a way, to remove all items in my list, and put my new ones I get from the csv. – Nico Apr 17 '14 at 10:16
  • for deleting items you need to write another powershell script or include the delete logic in existing powerhsell.if you want I can give you the powershell to delete the items. – SharePointMan Apr 17 '14 at 10:45
  • Find it with $ListItems = $list.Items;$count =$ListItems.Count - 1;for($intIndex = $count; $intIndex -gt -1; $intIndex--){$ListItems.Delete($intIndex)} Now I need to delete at the creation the Field "Title", and show all other fields I create with my script – Nico Apr 17 '14 at 11:47

Your Answer

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

Browse other questions tagged or ask your own question.