web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : bHDBKQ2EwzBEidmr1o+yBX
Power Automate - Building Flows
Answered

PAD Syntax Error / Powershell-Script using "%"

Like (0) ShareShare
ReportReport
Posted on 7 Nov 2021 16:57:46 by

Hello Community,

 

while running a Powershell Script from the Shell without any Errors, I get "Syntax Error" from PAD using the same Script.

 

The Script formats an Excel-Report and I need to set NumberFormatting in some Columns to "percentage".

I understand that this is somehow related to "https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Power-Automate-Desktop-Unable-to-Render-URL-Syntax-error-invalid/td-p/850469", but for my purposes I require to pass this Line in my Script for Excel to understand the formatting:

 

$WorkSheet.columns.Item("B:D").NumberFormat = "0%"

 

But here's where PAD's confuses my command with its internal variables because of "%" and throws the Syntax-Error.

 

I would highly appreciate any help. Thanks!

I have the same question (0)
  • v-qiaqi@microsoft.com Profile Picture
    on 09 Nov 2021 at 06:04:09
    Re: PAD Syntax Error / Powershell-Script using "%"

    Hi @Tylor,

    Could you please check the solution from @Zave to see if this could work on your side?

    Thanks for your cooperation.

  • Verified answer
    Zave Profile Picture
    88 on 07 Nov 2021 at 18:32:54
    Re: PAD Syntax Error / Powershell-Script using "%"

    Hi,

    You probably need to escape the "%" character. Try "%%" instead.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 707 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 499 Moderator

#3
chiaraalina Profile Picture

chiaraalina 312

Last 30 days Overall leaderboard
Loading complete