Alteryx Designer Desktop Discussions

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

Delete the sheet contents of all excel files saved in a folder using Alteryx

georgechacko
7 - Meteor

Hi,

 

I have some files saved in a folder. I have to delete the sheet contents except heading (Row 1) of all files using Alteryx work flow. Appreciate if anyone can help me with a workflow.

 

Thanks in advacne,

George A.C.

19 REPLIES 19
Jean-Balteryx
16 - Nebula
16 - Nebula

Hi @georgechacko ,

 

You can read those files using Input tool then keep only first row (headers) using Sample tool then output that overwriting existing data in your sheet using Output tool. Can you share sample file ?

georgechacko
7 - Meteor

Hi Jean,

 

Thanks for your reply.

 

I want to clear the data of all the files (regardless the number of files saved) saved in a specified folder. 

 

Regards,

George

Jean-Balteryx
16 - Nebula
16 - Nebula

All those files are Excel files ?

georgechacko
7 - Meteor

Hi Jean,

 

Yes. All the files are Excel file with extension .xlsx

 

Thanks

George 

Jean-Balteryx
16 - Nebula
16 - Nebula

Can you share two of those Excel files ? Even with mock data ! So that I can build an example workflow for you !

georgechacko
7 - Meteor

Hi Jean,

 

Thanks for your quick reply.

 

Sorry, I am not allowed to upload any files from my system as it is restricted. You can consider any excel files (.xlsx) saved in a folder. Just need to remove the contents except Column headings from 'Sheet1'.

 

Thanks,

George

HomesickSurfer
12 - Quasar

Hi @georgechacko

 

This works.  See below and attached.

Export and save test files in C:\temp to try.

If it works for you, please share, 'Like' and/or 'Accept as Solution'

 

I particularly like the use of a 'temp' batch script that doesn't require elevated security permissions.

Note:  The file attributes do not change.  eg.  Date modified.

 

Capture.PNG

HomesickSurfer
12 - Quasar

Hi @atcodedog05 

 

I think you'll like the proposed solution.  Have a look, let me/us know if you agree and provide enhancement(s), if any.  Thx

atcodedog05
22 - Nova
22 - Nova

Hi @HomesickSurfer 

 

I dont have much experience with this usecase. Hence no comments 😅

 

I got bat missing error while trying to run.

Can you provide an example with before and after snapshots of the file if you dont mind 🙂

 

This is a great and complex usecase. I couldnt think of a solution for this. Kudos to you for trying to solve it 🙂👍

Labels