Anaplan Connect Export Scripts Question

rinko
New Contributor

Anaplan Connect Export Scripts Question

Hi Dear All

 

I started learning export data by using Export Script through Anaplan guideline, but I found the script is a little different from the script which I found here.

 

And my question is whether I write scripts by copying which one, an errors came to me, would anyone can help me to check my scripts? Thank you 

 

And I did export action and saved the action name before i write this script, and i saved the export file, do not throw it into the rubbish box before i run the bat file.

 

@Echo off
set AnaplanUser="123@google.co.jp:A"
set WorkspaceId="011111111"
set ModelId="C22222222222222222"
set AuthUrl="https://auth.anaplan.com"
set Operation= -export "Grid - G1 Region.csv"-execute -get "C:\Users\Admin\Downloads\G1 Region.csv"
rem *** End of settings - Do not edit below this line ***
setlocal enableextensions enabledelayedexpansion || exit /b 1
cd %~dp0
if not %AnaplanUser% == "" set Credentials=-user %AnaplanUser%
set Command=.\AnaplanClient.bat %Credentials% -workspace %WorkspaceId% -model% %ModelId% %Operation%
@Echo %Command%
cmd /c %Command%
pause

 

 

and the error is 

MicrosoftTeams-image.png

1 ACCEPTED SOLUTION

Accepted Solutions
rinko
New Contributor

Re: Anaplan Connect Export Scripts Question

Dear Stacey

 

Thanks for your help.

I found my question was I didn't write those below

 

set Operation=-debug -service %ServiceUrl% -auth %AuthUrl% -workspace %WorkspaceId% -model %ModelId% -export %ExportAction% -execute -get %ExportFile%

 

And I solved this problem.Thank you so much.

View solution in original post

2 REPLIES 2
Stacey_Gibbens
Certified Master Anaplanner

Re: Anaplan Connect Export Scripts Question

@rinko 

The first issue I see is that you need a space between the name of your export action and -execute.

A second issue may be the quotes around your export path/export file name.  If you make sure your file name has no spaces (use a dash or underscore instead) then it will be an uninterrupted string and the command will understand where to put the file. 

What you have

set Operation= -export "Grid - G1 Region.csv"-execute -get "C:\Users\Admin\Downloads\G1 Region.csv"

My suggestion

set Operation= -export "Grid - G1 Region.csv" -execute -get C:\Users\Admin\Downloads\G1_Region.csv

Let me know if that helps...

Stacey

rinko
New Contributor

Re: Anaplan Connect Export Scripts Question

Dear Stacey

 

Thanks for your help.

I found my question was I didn't write those below

 

set Operation=-debug -service %ServiceUrl% -auth %AuthUrl% -workspace %WorkspaceId% -model %ModelId% -export %ExportAction% -execute -get %ExportFile%

 

And I solved this problem.Thank you so much.

View solution in original post