The script could be like this
$File = "D:\test.xlsx" $Excel = New-Object -ComObject Excel.Application $Workbook = $Excel.Workbooks.Open($File) $Worksheet = $Workbook.Worksheets.Item(1) [void]$Worksheet.Cells.Replace(",",".") $Workbook.Save() $Workbook.Close() $Excel.Quit() [void][System.Runtime.InteropServices.Marshal]::ReleaseComObject($Excel)
This article is helpful.
Please remember to "Accept Answer" and upvote if the reply is helpful.