I am trying to get excelcnv working with Invoke Power Shell.
excelcnv works fine from the cmd function in Windows.
I can tell the excelcnv is being invoked ok because if I rename something in the path I get an error message.
I get no error message when I run the bot - just the bot runs then stops. No change to the file.
I suspect I am not putting in the parameters in correctly.
In the Input Parameters section I have three variables:
Could you maybe create a sample project for other users to have a look? It would make your issue more visual and hopefully allow others to assist better.
Try to use dummy data and simplest workflow that recreates the issue. Try to also mention your version of Studio and activity packages
If you run the following command from the cmd prompt:
“C:\Program Files\Microsoft Office\root\Office16\excelcnv.exe” -oice "C:\Data\myfile.xls” "C:\Data\myfile.xlsx”
it will make a copy and convert the file from xls to xlsx.
As I say I can get this to work manually in the cmd prompt. I can also get it to work in VBA. I wanted to invoke the command using the Invoke Power Shell activity.
See attached file. I have added three parameters to the input. The command line switches; the input file; and the output file.
You will note that double quotes are important when you input this from the cmd manually. I tried to replicate this in the parameters. I tried several combinations of double quotes.ExcelCnv.xaml (6.6 KB)
Hi @Pablito
I do not know what you mean by ‘attributes’.
The input has "C:\Program Files\Microsoft Office\root\Office16\excelcnv.exe” as the CommandText.
Then there is a collection of parameters:
-oice
"C:\Data\myfile.xls”
"C:\Data\myfile.xlsx”
Many thanks Pablito, the second suggestion worked.
The first suggestion did not accept the string as a script.
You have saved me the task of opening the file in Excel and saving as xlsx.