SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a sharepoint list: MyList

I insert item to this list by Linq to Sharepoint (context object) like this:

context.MyList.InsertAllOnSubmit(data.Items.Select(n => dataConvertor.Convert(n)));

Convert method:

MyListItem = new MyListItem()
   Column1 = "1";
   Column2 = "2";
   Column3 = "3";

The data is received from an excel file but for some excel files I get the Error: Cannot insert an entity that already exists.

I tried to do:

var myist = data.Items.Select(n => dataConvertor.Convert(n));
foreach (var item in myList)

It worked but because the data is very large it took a lot of time...

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.