powershell script to enter formula into an excel spreadsheet
Posted on 2014-04-06
I have a report which I would like to create automated excel querys using a scripted apporach. I've come into an issue with using double quotations with creating formulas in powershell code. I just wanted help with regards to placing it into a powershell variable
$forumal1 = @"
=COUNTIFS(sheet2!C:C,"Bermuda", sheet2!I:I, "dynamite")
This would error in powershell as Excel would require the double quotes when preforming actions from multiple sheets.
I was wondering if someone could help me understand $([char]34) using the $formula1 as an example?