title: MS Dynamics CRM 365 - import data from Excel files
body: <p>I'm getting into MS Dynamics CRM 365 programming, and have been dealing with data imports of lookup / reference entities.</p>
  
  <p>I created a new entity with just the default <code>Name</code> column, stored and published it, and then went to look at in CRM. From the default "main" view, I choose the "Data Import" option and downloaded a template <code>.xlsx</code> file, which I then filled out. After that, I chose "Import Data" and uploaded this filled out <code>.xlsx</code>, and it was submitted, parsed, transformed successfully and the rows I had entered show up as expected. </p>
  
  <p>So far, so good.</p>
  
  <p>Now I created a second lookup entity (again with just the <code>Name</code> field), published it, and thought I'd be smart and just "re-use" that <code>.xlsx</code> "template" I had downloaded for the first lookup entity, and enter the new values for the second lookup entity, and then upload this manually "recycled" file. I did change the file name of the <code>.xlsx</code>, as well as the worksheet name, to match the name of the second lookup entity.</p>
  
  <p>And while the upload, the parsing and transforming worked just fine - the actual rows I had inserted ended up in the <strong>first</strong> lookup entity... </p>
  
  <p>So my conclusion is: <em>somewhere</em>, CRM must keep track of what <strong>entity</strong> that <code>.xlsx</code> was indended for - and it's <em>neither</em> the file name of the <code>.xlsx</code>, <em>nor</em> the name of the worksheet (which I had also updated) - it must be stored somewhere else.</p>
  
  <p>Does anyone know where?? Can I change it somehow (manually or programmatically)? </p>
  
  <p>After I went through the full cycle again (download import template <code>.xlsx</code>, fill that out, upload that file) - it works just fine for the second lookup entity, too.</p>