Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I tried a lot to figure out how to skip writin onto a particular excel cell using C#, but couldnt get the proper logic.</p> <p>my eg: <em>Team Leader (required) abcxyz User1 user2 Customer Interface Focal dfgidf user23 user3</em></p> <p>each of the names above has to be in a particular cell... but in the excel template, first cell (Team Leader (required)) is readonly, so i cant write into that cell, so my final excel sheet should show </p> <pre><code> abcxyz User1 user2 Customer Interface Focal dfgidf user23 user3..... ..... </code></pre> <p>i tried various logics for this... please see the code below</p> <pre><code>Microsoft.Office.Interop.Excel.Workbook SelWorkBook = excelappln1.Workbooks.Open( curfile, 0, false, 5, "", "", false, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "", true, false, 0, false, false, false); Microsoft.Office.Interop.Excel.Sheets excelSheets = SelWorkBook.Worksheets; Microsoft.Office.Interop.Excel.Worksheet excelworksheet =(Microsoft.Office.Interop.Excel.Worksheet)excelSheets.get_Item(CurSheetName); Microsoft.Office.Interop.Excel.Range excelRange = excelworksheet.UsedRange; if ((!excelworksheet.Cells[CurTaskNode.DATA_MIN_ROW + minRow, CurTaskNode.DATA_MIN_COL + minCol]).Locked) { // Assigning the Value from reader to the particular cell in excel sheet excelworksheet.Cells[CurTaskNode.DATA_MIN_ROW + minRow, CurTaskNode.DATA_MIN_COL + minCol] = values[iValueIndex]; iValueIndex++; } </code></pre> <p>but the error shows, in the if statement Error 1 Operator '!' cannot be applied to operand of type 'object'</p> <p>so, please say how to handle this case.</p> <p>Thanks Ramm</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload