Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Is it possible to get the 'Last Saved by' name for a list of files?

ALT_2358
9 - Comet

I need to know who last modified the Excel files in a directory (i.e. the last saved by person when right clicking a file and going to properties).

 

It doesn't seem to be one of the directory tool fields. 

 

I tried the workflow here: How to get the last modified person name of excel ... - Alteryx Community

 

This sort of worked except it shows who last did anything at all to the file (including saving it down from an email into a folder, moving to another folder, renaming, etc.). This is different to the last saved by property which is focused on who actually changed any of the contents in the file.

 

Any suggestions would be much appreciated.

6 REPLIES 6
danilang
19 - Altair
19 - Altair

hi @ALT_2358 

 

All excel files are just renamed zip files.  If the file was actually modified in Excel, as opposed to a converted Google Sheets file, inside the zip will be the following path .\docProps\core.xml. 

 

The attached workflow opens the xlsx file as a Zip file with the additional specifier to read the xml file in this path and extract the outerXML. 

 

danilang_1-1631975470778.png

 

The Parse XML tool gets the child nodes from the main element giving you the last modifier in the cp:lastModifiedBy field

 

danilang_0-1631975370789.png

 

Replace the file in the input tool with the file that you're looking to read.  As with all excel operation, the workflow will error if the file is open.

 

Dan

 

    

ALT_2358
9 - Comet

That's amazing, it works! Thank you so much!

 

Do you know if it's possible to convert it to a dynamic input? I tried by changing the entire path but I get an error saying no file specified in zip archive. 

If it's a normal input every time I change the file path it automatically changes to an Excel input and I have to set it up again so it's the same as the zip input you used. 

EDIT: Actually, just realised that I needed to add '|||docProps/core.xml' to the path before the dynamic input. 

 

It's working now - thank you!!

 

Thanks

mobasti
5 - Atom

Hi,

did you also find a solution for getting the names out of multiple files (directory) without "touching" each single file?

 

Thank you very much!

BR Sebastian

ALT_2358
9 - Comet

Hi Sebastian,

 

I did - I used a batch macro. Just place a dynamic input tool within the macro (using the zip setup) - the file path of the dynamic input tool needs to be set using the macro input. You may need to play around with the formula within the action tool to get this to work. I’ve moved companies now so I no longer have access to the macro unfortunately but hope that helps nonetheless. 

mobasti
5 - Atom

thanks for your reply! Unfortunately I do not have any experience with the macros yet. Could it touch diverse data types (e.g. excel, word, folder, etc.)?

Looking forward to hearing from you!

BR Sebastian

ALT_2358
9 - Comet

Yep I’ve had it cycle through a list of file paths which included Excel, Word and PowerPoint files. It didn’t work for images if I recall correctly, though. 

There are plenty of resources on the community to help you get started with macros. Check out the batch macro examples - that’s how I learnt about them. 

Labels