Multiple output from cli

I am trying to use the cli function with a transformation, which has multiple outputs.
I have defined alias’ for input and the four outputs.

But this terminal-command does not output anything:
/Applications/ '/Users/jh/Easy Data Transform/Revisor Posten/RevisorPosten-cli.transform' -file 'input=/Users/jh/Desktop/Testinput.xlsx' 'liste-egenforside=/Users/jh/Desktop/liste-egenforside.xlsx' 'liste-standard=/Users/jh/Desktop/liste-standard.xlsx' 'post-egenforside=/Users/jh/Desktop/post-egenforside.csv' 'post-standard=/Users/jh/Desktop/ost-standard.csv' -cli

If I run the transform in the program it exports the files in the defined location in the transform file.

Is there a way to achieve this?

Here is the transform file if that helps.


I don’t see the transform attached.

But I think the issue is that you need to put a -file before each file whose location you are varying. So:

/Applications/ '/Users/jh/Easy Data Transform/Revisor Posten/RevisorPosten-cli.transform' -file 'input=/Users/jh/Desktop/Testinput.xlsx' -file 'liste-egenforside=/Users/jh/Desktop/liste-egenforside.xlsx' -file 'liste-standard=/Users/jh/Desktop/liste-standard.xlsx' -file 'post-egenforside=/Users/jh/Desktop/post-egenforside.csv' -file 'post-standard=/Users/jh/Desktop/ost-standard.csv' -cli

I forgot to post the transformation.

I also forgot I reference a file with headers. So now I have tried to define all the files with alias’ with this command:
/Applications/ '/Users/jh/Easy Data Transform/Revisor Posten/RevisorPosten-cli.transform' -file 'input=/Users/jh/Desktop/Testinput.xlsx' -file 'liste-egenforside=/Users/jh/Desktop/liste-egenforside.xlsx' -file 'liste-standard=/Users/jh/Desktop/liste-standard.xlsx' -file 'post-egenforside=/Users/jh/Desktop/post-egenforside.csv' -file 'post-standard=/Users/jh/Desktop/ost-standard.csv' -file 'PostformatBlankeHeaders=/Users/jh/Easy Data Transform/Revisor Posten/PostformatBlankeHeaders.xlsx' -cli

But it does still not output anything to my desktop. Just to the standard location from the transform.

More tests. Forgot to define the sheet in the filename for the input.
/Applications/ '/Users/jh/Easy Data Transform/Revisor Posten/RevisorPosten-cli.transform' -file 'input=/Users/jh/Desktop/Testinput.xlsx[1]' -file 'liste-egenforside=/Users/jh/Desktop/liste-egenforside.xlsx' -file 'liste-standard=/Users/jh/Desktop/liste-standard.xlsx' -file 'post-egenforside=/Users/jh/Desktop/egen.csv' -file 'post-standard=/Users/jh/Desktop/standard.csv' -file 'PostformatBlankeHeaders=/Users/jh/Easy Data Transform/Revisor Posten/PostformatBlankeHeaders.xlsx' -cli

Now it output the two Excel-files to my desktop. But not the 2 csv-files.

I will investigate and get back to you.

1 Like

I can’t see anything obvious. Are any error messages output in the console where you enter the command line arguments?

Can you please us send the 2 input files, so I can try to replicate the issue here. We will treat them as confidential.

If they are more than 10MB then please upload them somwhere and send us a link.

There is not any errors in the terminal. I vill send the input files by e-mail. Thanks for the help.

I have the files, thanks. and will look at it now.

I can reproduce your problem here and fix it by adding the sheet name to PostformatBlankeHeaders.xlsx, so:


Is replaced by:


So I have this (with somewhat different paths to yours):

/Applications/ '/Users/andyb/Desktop/jh/RevisorPosten-cli-modified.transform' -file 'input=/Users/andyb/Desktop/jh/Testinput.xlsx[1]' -file 'PostformatBlankeHeaders=/Users/andyb/Desktop/jh/PostformatBlankeHeaders.xlsx[Ark1]' -file 'liste-egenforside=/Users/andyb/Desktop/jh/batchout/liste-egenforside.xlsx' -file 'liste-standard=/Users/andyb/Desktop/jh/batchout/liste-standard.xlsx' -file 'post-egenforside=/Users/andyb/Desktop/jh/batchout/egen.csv' -file 'post-standard=/Users/andyb/Desktop/jh/batchout/standard.csv' -cli

I will see if I can add some helpful error messages to make this easier in future. Maybe also some way to generate an example command line string.

Thanks. So a bit my mistake, since I forgot about the sheet name for the other Excel-file.
Thanks again for the excellent support.

As a follow up, then it could be a good feature to be able to could set it to just use the first sheet.
Because sometimes I receive Excel-files with only one sheet, but that sheet have a different name each time.

Glad that helped.

I agree it would probably be useful to be able to use ‘[1]’ to mean the first sheet (assuming there is no sheet named “1”!), ‘2’ for the second sheet etc. I will add it to the wishlist.

In the next release you will be able to use ‘[1]’ to mean the first sheet (assuming there is no sheet named “1”!).

Also if no sheet is named, it will assume the first sheet.

I am also lookign into a way to make the command line arguments more easy to set up.

Note also that you can get more useful error messages from command line arguments if you add the -verbose flag.

1 Like

I am experimenting with a new feature that lets you create a sample command line, which you can then paste into a terminal, script etc and edit. Hopefully that will make the command line easier to use.