title: Create a non editable attribute in Excel cells that is still readable for a c# program
body: <p>I have a very particular problem. I looked for similar problem to mine, test a lot of solution everyone proposed, but none of them is what I need.</p>
  
  <p>My client need to export data sheet in excel format. Those data can be sorted, modified, rearranged, new values can be entered, some lines may disappear, some other can take their places, in short, anything can happen to those data. For example purpose, let's say that we export a list of item shown in a grocery list. </p>
  
  <pre><code>ItemID ItemName Price
  Fr01   Apple    2.5
  Fr02   Orange   4.0
  Mt01   Beef     10.0
  Mt02   Pork     8.33
  Vg01   Carrot   1.25
  </code></pre>
  
  <p>My problem is that this data can be imported back in the software that originally created the excel to update (or add) these values in database base on the "ItemID". I already do validation if data is "correct" in value and type and interrelationality. </p>
  
  <p>I tried to put a name to the range. The problem is when data is filter / sorted, the name don't follow the content, it stand still at the same position</p>
  
  <p>original : (Range name is the name of the range, not an actual column)</p>
  
  <pre><code>ItemID ItemName Price || Range Name
  Fr01   Apple    2.5   || data_fr01
  Fr02   Orange   4.0   || data_fr02
  Mt01   Beef     10.0  || data_mt01
  Mt02   Pork     8.33  || data_tm02
  Vg01   Carrot   1.25  || data_vg01
  </code></pre>
  
  <p>after sorting on ItemName:</p>
  
  <pre><code>ItemID ItemName Price || Range Name
  Fr01   Apple    2.5   || data_fr01
  Mt01   Beef     10.0  || data_fr02
  Vg01   Carrot   1.25  || data_mt01
  Mt02   Pork     8.33  || data_tm02
  Fr02   Orange   4.0   || data_vg01
  </code></pre>
  
  <p>As you can see, all the info correctly follow, except the Range Name, so, when I try to import, I got a lot of data mismatch.</p>
  
  <p>My other try was to make the NameRange an actual cell in excel. With this method, the cell follow, but can be changed, so I try to create a protected cell. Sadly, lines can't be inserted or deleted because of that. I found a workaround that consist in having names in a masked sheet, but once again, I need to synchronize sheets, which is not reliable for the same reasons mention previously.</p>
  
  <p>Even worst, I must support both xls (97-2003) and xlsx. </p>
  
  <p>So I'm looking for a stable workaround that will allow me to store somehow my "range name" data in the cell, making it invisible for the Excel User, but will follow the data so i can retrieve it at the right place when re-importing data.</p>
  
  <p>Thanks in advance.</p>
  
  <p>EDIT :</p>
  
  <p>At finale, I must be able to write this property from C# application and then read back that same property with C#, and it must be compatible both excel file format, not viewable nor editable by excel user but stay with it's original value set, whatever happen to the data within the sheet except deletion (I don't mind if I just put it on the cell I wrote Apple in and not the entire range)</p>