title: Lock image (or picture) or Get image (or picture) from excel using EPPlus
body: <p>I'm using EPPlus for excel export. In that, I've locked image. Through code before insert some values to cells, I've unprotect sheet data or cells.</p>
  
  <p>After unprotect, I've inserted values and locked those cells and then applied protection. For the cells which have data are locked. But the image has unlocked.</p>
  
  <p>Now I'm having only two solution.</p>
  
  <ol>
  <li>How to keep the image (or picture) has locked in sheet.</li>
  <li>How to get the image (or picture) from excel and insert that image as embedded.</li>
  </ol>
  
  <p>How to do that ? Here i've given my code.</p>
  
  <pre><code>// If worksheet has protection already, then need to unprotect
                      if (workSheet.Protection.IsProtected)
                          workSheet.Protection.IsProtected = false;
                      else
                          workSheet.Cells.Style.Locked = false;
  
  
  workSheet.Cells[rowIndex, columnIndex].value="Test";
  workSheet.Cells[rowIndex, columnIndex].Style.Locked=true;
  
  // Protect the sheet after cells locked
                      workSheet.Protection.IsProtected = true;
                      workSheet.Protection.SetPassword(BasReportPassword);
                      workSheet.Protection.AllowSelectLockedCells = true;
                      workSheet.Protection.AllowSelectUnlockedCells = true;
                      excelPackage.Save();
  </code></pre>