Another Possible solution #1410
Shooting300FPS
started this conversation in
General
Replies: 1 comment
-
@Shooting300FPS Thanks for posting! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I originally posted this Issue: #1326.
Essentially, I was having a problem with using the Set-Column command using an Excel formula that included " ". Because the formula in the {} were specified by "", the command kept blowing up. Here is an example formula.
Set-Column -Worksheet $ws -Heading $Header -Value {"=IF(C$row<>"",YEAR(C$row))"}
I tried the solutions that were provided, but my Powershell skills are rudimentary at best. I have been messing around with my code off and on trying to find the solution. I mentioned the challenge to a team member and after working for a couple minutes, he provided an alternate solution. He said that my adding a ` in front of each " in the equation would solve the problem. Since my original issue is marked closed, I couldn't post an update to my issue, but I wanted to pass along another possible solution to my problem while using this powerful tool.
Original equation:
Set-Column -Worksheet $ws -Heading $Header -Value {"=IF(C$row<>"",YEAR(C$row))"}
Update equation:
Set-Column -Worksheet $ws -Heading $Header -Value {"=IF(C$row<>
"
",YEAR(C$row))"}Beta Was this translation helpful? Give feedback.
All reactions