Link to home
Start Free TrialLog in
Avatar of bbimis
bbimis

asked on

how do i update excel cell using closedxml without overwriting the entire file

how do you update a single cell using closedxml ? When i use this code, it takes and overwrites the entire file not just that one cell.  
I can use interop to do this but I was wanting to try closedxml to learn.

here is my code that should only update row 1 column 2
 Dim xlworkbook As New XLWorkbook("c:\testcode\exceltest.xlsx")
        Dim xlworksheet = xlworkbook.Worksheet(1)

        xlworksheet.Cells(1, 2).Value = "testing1"
        xlworkbook.Save()

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bbimis
bbimis

ASKER

how did i not catch that? thanks!
Not a problem bbimis, it happens to the best of us. 👍