Excel Save As

each week I have to download several CSV files and save them as XLSX files. Is there a way KM can automatically prompt the Save As window upon opening the CSV file?

KM works primarily using "triggers". Firstly, you didn't even mention which application you were using to open the CSV file, and the solution may depend upon that. But secondly, apps don't usually create signals or triggers that allow KM to activate. So that might mean you have to have a KM macro "polling" (running continuously) to monitor for your conditions that you want to trigger the action.

However there may be a workaround here. I can think of more than one workaround, but I'll propose the idea that seems most likely to work for you. KM does have a trigger that is activated when a folder "adds an item." You might be able to use that as your trigger. If your CSV files are always stored in the same folder (you didn't say if that was the case), then you can create a KM macro which triggers on changes to that folder. If the macro determines that there is a new CSV file in that folder, it can take an action.

The action it takes is up for discussion here. (There are several possibilities.) And it depends in part upon what app you are running, and probably why you are bringing up the Save As feature, and what you are doing with Save As. Perhaps if you give us the bigger picture we could provide a solution. What's the goal here? Would you mind if KM did all the work itself, rather than trying to trigger on your own "Save As" dialog box?

I think you are wanting the "Save As" to somehow act as a "trigger." But that's probably not a very good solution. That's why I'm asking so many questions... so that we can find an appropriate trigger that works for you.

I found that Numbers opened TSV files directly. (I assume that CSV is opened as swiftly too.) No user interaction required. With this script you can export to Excel format:

Hi Sleepy,
Thanks for the detailed response.
The CSV file always downloads to the Downloads folder on my Mac.
The goal is to automate the renaming and save As process for the multiple Excel files I download each month.
No, I would not mind if KM did all the work itself, however, I do this for 8 different clients each month and the file needs to be renamed with the client name as part of the file name.
For instance, the CSV downloads from a web-based software we use for billing. It downloads with a randomly generated title like this 45TG48uTwth5609.csv and I need to rename the file as PBC Company Billing Export JAN 2022.xlsx

I don't have Excel, so I don't know how it works, but I have Numbers. You can adapt the following approach for Excel if you want to. Create a macro that does the following when you trigger it:

  1. Ask you for the "company name" at which point you enter a name like "PBC Company Billing Export Jan 2022" (Perhaps it should even let you pick names form a list.)
  2. Have it do the following steps for each CSV file in the Downloads folder.
  3. Open the CSV file with Numbers
  4. Wait for Numbers to successfully load/conver the CSV into a Numbers empty spreadsheet
  5. Ask Numbers to Save the document. Numbers will ask you for a filename (you can paste the company name you got from above.)
  6. Wait for the Save to complete.
  7. Close Numbers

I see a small ambiguity in your explanation above. You said you want it to handle multiple files, but you didn't say if that was multiple files per company, or one file for multiple companies. So my algorithm may need to be modified if I guessed wrong.

Transcribe your workflow step-by-step to KM actions, BANG :astonished: , you got a repeatable KM macro!