Trying to "Save As" in Excel Issue

excel
activities
p_solved

#1

Hello,

I am trying to Save an Excel File to a different format using UI Path.
The workflow works fine, it opens the Save As window, inputs the filename, it selects the file format in the dropdown list and then it clicks the save button. However the file format does not change.
This is the bit of the flow in question:

At the end of that bit of the workflow, it save the file with the new name, but it’s not in CSV.

Notes:
My Process requires me to write datatables into a template (xlsm), save it with a different filename in order to avoid altering the template, delete some rows and make it to CSV.
The way I picked is the best from my point of view.
I know there is an alternative to read the processed excel into a datatable and then write it to CSV, however that would create extra files which I am trying to avoid.

Please help


#2

Ok, does anyone have an idea where I can get further help with this issue ?
Maybe something from the staff of UiPath ?


#3

It might be the case that Select Item (which is an API - Simulate Type - activity that happens under the hood) does not work on that dialog.

Could you try to replicate it using click/key down?


#4

I tried using Click Text / Click Image activities to select the desired format.
It does bring the format to the window

I even tried to click on something inside the Save As window, to make sure it’s selected, before clicking “Save”
It saves the file but it does not change the format. And it doesn’t make any sense


#5

It will be helpful to attach the workflow and the file.
As a workaround could you just read the Excel in a datatable and using WriteCSV output it in CSV format?


#6

Hello,

Attached a dummy workflow that demonstrates my initial issue.

Save_Test.zip (63.2 KB)

It would appear some sort of work-around can be considered using hotkeys, but I’m not sure how reliable that is.
Considering the target application is Excel, I believe this should be looked at by the UiPath Team.
I may be wrong, of course :))))


#7

after you set the file name in the text box, simulate Tab key then send “C” to the the combobox


#8

You can try this one and let me know, working for me after made some changes.
Save_Test.zip (381.9 KB)

May be some changes you have to made because i can see there is file type different in selection so reindicate things if not working.

Regards…!!


#9

Thank you for the file, however the flow doesn’t work for me.
I noticed you replaced the Excel Application Scope with Start Process. That would not be a good solution because in my workflow there are other Excel manipulations that would not work.


#10

Just for demo purpose because that file shoud be open for me and you are
using ui things like hot key and element clicks so there is no need to use
excel application scope. It is to intracte with excel and perform operation
without to open it. And you can replace the selctors by reindicating…
Because i have seen your windows showing different menu for csv so just
reindicate and check tje flow. For.me it works.


#11

I have the same ISSUE. Select Item, Click, Click Text or Click Image does not work. Only send hot key with down in a do while with Image Exist can do the job.

I hope the UiPath Team is looking for a solution to fix this in future versions. I’m using 2016.2.6442.

@badita


#12

Hey all,

I have almost exactly the same issue. I would like to save an already opened excel file as well as a "Text (Tab delimited) (.txt)" file. The workflow works fine and I can see that the dropdown menu changed to the desired format but when the robot presses enter, then the file will not saved as expected as a text (Tab delimited) (.txt) file but as the standard *.xls format.

@aksh1yadav the “save_test.zip” file hasn’t open correctly on my device.

Is there any new idea till now? Need it urgently.
Thanks to all!


Screen recorder is selecting different option when we run the task
#13

Hello,
A work around that I found in Excel is building a workflow like this:

  • Excel Application Scope;
  • Click “File” ;
  • Click “Export” ;
  • Click “Change File Type” ;
  • Double Click on the desired file format ;
    A “Save As” Window will appear, with you chosen format already selected. In this widow you can write the desired File Name / Path and it will save it correctly.

Hope this works.


Excel always saving in wrong location
#14

HI @PetreN Thanks a lot your solution really worked.

Regards
Divya


#15

Hello, I found another, hopefully simpler, workaround.
We can use quotes on the path, and it works even without setting the file type.

In Type Into path:
"""test-data.csv"""

%E7%84%A1%E9%A1%8C


#16

Both workarounds (menu or quotes) don’t work in a certain scenario, like when Excel is opened by another application and I hit F12 to ‘Save as’ .xls. I have to first save the file in .xlsx format, then reopen it and use the workaround with quotes to save as .xls, then delete the .xlsx file. Would be great if there was a straightforward way of doing this but it doesn’t sound like it.


#17

Hi @Johannes did you get the solution , I am facing the same issue.


#18

I assume the issue is similar to Word where I also had issues with this. My only workaround was to add delays of 1000ms before each click and then add a onUIElementAppear activity to wait for the screen to be ready before clicking save. Overly complex but this works 100% reliably for me.