1

I'm very new to programming and I'm trying to find a program or method to pull out all file names, sheet names, and count the rows of data per sheet from all the Excel files in a single folder. Thus far, I've entertained mostly Excel approaches, but I also considered VBA solutions, yet no luck.

I thought I had finally found my solution at http://www.basarat.com/2009/07/getting-row-counts-in-all-excel-file-by.html

It looks like its a utility library with a tool that exactly solves my problem, but the author indicates that it has to be downloaded at https://code.google.com/p/dexutils/

I don't have any real experience with Python and only a brief introduction to Java, but Python keeps coming up as an acceptable tool for tackling statistical/data analysis (which I need to master due to a recent career change). So it's on my list of things to learn. I thought this would be a good way to dip my toes in the Python water.

But then I saw that the blog entry and download page for the utility have no comments and no ratings. How do I know that downloading that file won't expose my computer to malware? This is a company computer, and I'd like to keep this job for the foreseeable future. Downloading malware will not accomplish that.

I know that sounds a little paranoid of me, but I figure that when it comes to security, better safe than sorry. Is there any way to check a file like this for malware or to confirm that it is only doing what it claims to (i.e., not running something evil in the background or messing with the registry, etc.)? I have tried to find an answer for this on Google and this website for longer than I care to admit, but I just don't know enough about computer security or Python programming to know that I'm being safe.

Please speak slowly and use small words. :-P Or just give me links to sources.

Tim Williams
  • 154,628
  • 8
  • 97
  • 125
  • You'd have to audit the code; read through it all to make sure it's not doing anything bad. Or ask (pay) someone else to do it. – Cyphase Aug 18 '15 at 21:53
  • 1
    It's just like any other software. If you trust the author, use the program. If you don't trust the author, don't use it. If it's open source, you can go through it yourself and make sure it doesn't do anything malicious. If you don't know how to do this evaluation, treat it like any other piece of software you don't trust: don't run it. – TigerhawkT3 Aug 18 '15 at 21:59
  • dont you have any anti-virus software? – DrBwts Aug 18 '15 at 22:03
  • @DrBwts, that's not gonna help much. – Cyphase Aug 18 '15 at 22:04
  • With every bit and piece of a computer that needs to 'call home' periodically or stop working, what isn't malware now-a-days? –  Aug 18 '15 at 22:21
  • Unfortunately, most anti-virus software thinks that any file with an extension commonly used for source code must be malware. – TigerhawkT3 Aug 18 '15 at 22:25

1 Answers1

0

Use openpyxl

from openpyxl import load_workbook

wb2 = load_workbook('test.xlsx')
print wb2.get_sheet_names()

Use you can os.listdir(path) to find all the files in folder. Pass that back into load_workbook()

Ken Ash
  • 36
  • 3