excel - Deselecting currently editing cell in c# interop -


i have test button in excel addin looks this

    private async void testbtn_click(object sender, ribboncontroleventargs e)     {         microsoft.office.interop.excel.application curexcel =             (microsoft.office.interop.excel.application)globals.thisaddin.application;         microsoft.office.interop.excel.workbook curworkbook =             (microsoft.office.interop.excel.workbook)curexcel.activeworkbook;         excel.worksheet worksheet = curworkbook.worksheets.item[1] excel.worksheet;           excel.range line = (excel.range) worksheet.rows[1];          line.insert();     } 

it works fine except when have cell selected editable - when cursor flashing on 1 of cells. need able deselect cells before line.insert() how can this?


Comments

Popular posts from this blog

minify - Minimizing css files -

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -