mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-16 00:04:24 +00:00
Added example demos -AutoNameRange and PowerShell injecting Excel formulas
This commit is contained in:
12
Examples/SpreadsheetCells/ExcelFormulasUsingAddMember.ps1
Normal file
12
Examples/SpreadsheetCells/ExcelFormulasUsingAddMember.ps1
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Remove-Item .\testFormula.xlsx -ErrorAction Ignore
|
||||||
|
|
||||||
|
@"
|
||||||
|
id,item,units,cost
|
||||||
|
12001,Nails,37,3.99
|
||||||
|
12002,Hammer,5,12.10
|
||||||
|
12003,Saw,12,15.37
|
||||||
|
12010,Drill,20,8
|
||||||
|
12011,Crowbar,7,23.48
|
||||||
|
"@ | ConvertFrom-Csv |
|
||||||
|
Add-Member -PassThru -MemberType NoteProperty -Name Total -Value "=units*cost" |
|
||||||
|
Export-Excel -Path .\testFormula.xlsx -Show -AutoSize -AutoNameRange
|
||||||
Reference in New Issue
Block a user