Excel can't save , and read wrong data
Hi everyone.
I am newbie in PowerShell, I only try to edit cell A1 in Excel file and check cell B1 have Formula connect with cell A1 , I want get value B1 when I change value in A1
Problem is , I can change value in Cell A1 but the value in B1 not change even I save or save as or close excel for autosave,
but it still not get correct value in B1
Hi,
I faintly remember having had a similar issue, which was resolved when I used the switch -calculate when closing the excel package, see also https://github.com/dfinke/ImportExcel/blob/master/mdHelp/en/close-excelpackage.md#-calculate
Thank you so much , it work, I have other question, Could I calculate without closing the excel then i can get value :D, it will be great, because I need use excel calculate alot and get data from excel. I try to build automation excel with PowerShell Thank you so much
I have other question , Sorry I ask alot question , do we have document about those functions or syntax like picture.
If have those document I can learn faster
Thank you so much.

Thank you so much , it work, I have other question, Could I calculate without closing the excel then i can get value :D, it will be great, because I need use excel calculate alot and get data from excel. I try to build automation excel with PowerShell Thank you so much
Alright, the diffcult questions! :-) $xl=Open-ExcelPackage -Path .\test.xlsx $ws=$xl.Workbook.Worksheets['ABC'] $ws.cells["D1"].Value=23.998 #Formula in E1: $ws.cells["E1"].formula="+d1*2" [OfficeOpenXml.CalculationExtension]::Calculate($ws.cells["E1"]) $ws.cells["E1"].value
To answer your other question:
- Search the web
- https://github.com/dfinke/ImportExcel/tree/master/mdHelp/en
- And if you need to dig deeper: https://epplussoftware.com/docs/5.3/api/OfficeOpenXml.html
- Try & Error (without going ballistic) :-)
Thank you so much, it work :D
Thank you @TWalijew was heading off to test the Calculate method. This looks like a good candidate for the Examples folder 😉