Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Worksheet_Size

Hridni
5 - Atom

I am trying to create a workflow to determine the size of each worksheet in KB in a given workbook to determine which sheet is the most data-intensive. I need help with how to get the size of each sheet, and fyi the workbook is macro-enabled.

2 REPLIES 2
caltang
17 - Castor
17 - Castor

You can try the Directory tool, it has a sizing element as well.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
danilang
19 - Altair
19 - Altair

Hi @Hridni 

 

Since excel files are just zip files with a modified extension, you can open the file as a zip file and open the xml files for the sheets as csv.(see the marked solution here for a sample workflow)   The xml for the sheets look like this  

s.png

Since you're looking for the most data intensive sheets, it would be the one with the most cells.  Just count the number  "<c " lines for each sheet. 

 

Of course one of the issues you'll face is that you need to know the names of sheets in order to open the correct xml files.  There's a workflow here that uses python to find all the file names that you can filter to return all the files in the \xl\worksheets path within the file

 

Dan  

 

 

Labels