Created
November 11, 2022 15:32
Update Excel Files Using .NET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Workbook wkb = new Workbook("sourceFile.xlsx"); | |
Cell cellWithData = wkb.Worksheets[0].Cells["A1"]; | |
cellWithData.Value = 100; | |
Cell cellWithFormula = wkb.Worksheets[1].Cells["C1"]; | |
cellWithFormula.Formula = "=Sum(A1,A20)"; | |
wkb.CalculateFormula(); | |
Worksheet sheet = wkb.Worksheets[1]; | |
Cell cell = sheet.Cells["A1"]; | |
cell.PutValue("Hello World!"); | |
wkb.Save("modified-targetfile.xlsx"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment