Anaplan Connect - Export Process Script

Hi team,


I have a Anaplan Connect script to export a process of 1 action (just for test purposes) but I cannot get it to work. Currently receiving the attached error. My script is below




@echo off

set AnaplanUser="email:PW"
set WorkspaceId="8a81b09e6181d3600161b51408040171"
set ModelId="1EFC79258714420A9FFE460E0A008194"
set ServiceUrl=""
set AuthUrl=""
set DumpName= "C:\Users\mturkenburg\WHISPIR\Gareth Edlin - FP&A\Anaplan\P&L\Monthly Uploads\errors.txt"
set Chunksize=50
set Operation=-debug -service %ServiceUrl% -auth %AuthUrl% -workspace %WorkspaceId% -model %ModelId% -chunksize %Chunksize% -Process "Test Export" -execute -get "C:\Users\mturkenburg\WHISPIR\Gareth Edlin - FP&A\Anaplan\P&L\Monthly Downloads\1.1 P&L OPEX Buckets - Month.CSV" -output %DumpName%

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%

Best Answer

  • jnoone
    Answer ✓

    Hi - In the Set Operation line, right after the line:  -Process "Test Export" -execute  you should add in the following syntax:  -file "1.1 P&L OPEX Buckets - Month".  That way it knows what downloaded file to look for from your model.  Full syntax would be:


    set Operation=-debug -service %ServiceUrl% -auth %AuthUrl% -workspace %WorkspaceId% -model %ModelId% -chunksize %Chunksize% -Process "Test Export" -execute -file "1.1 P&L OPEX Buckets - Month" -get "C:\Users\mturkenburg\WHISPIR\Gareth Edlin - FP&A\Anaplan\P&L\Monthly Downloads\1.1 P&L OPEX Buckets - Month.CSV" -output %DumpName%


     Hope this helps resolve.




  • Thanks @jnoone 


    It''s confusing that the -file variable for imports is the name of the Source Label file while for exports it is the name of the export action! Also I spelt process with a capital P originally and this was causing an issue