title: Copy Style/Format of one cell to another cell Excel Interop C#
body: <p>I want to copy Cell format/Style to another cell
  Just like "Format Painter" option in Excel application </p>
  
  <p>Here is what I have tried but didnt worked</p>
  
  <pre><code>Microsoft.Office.Interop.Excel.Style HeaderStyle = null;
  
  SxlSheetRange = (Microsoft.Office.Interop.Excel.Range)xlTamplateWorkSheet.UsedRange[rowCnt, colCnt];
  DxlSheetRange = (Microsoft.Office.Interop.Excel.Range)xlTamplateWorkSheet.UsedRange[DrowCnt, DcolCnt];
  
  HeaderStyle = SxlSheetRange.Style;
  
  DxlSheetRange.Style = HeaderStyle;
  </code></pre>
  
  <p>I dont want to copy just want to style the cell just like the "Format Painter" option in Excel.</p>