Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

ParseExcel but decode/decrypt it

by little (Curate)
on Sep 05, 2007 at 19:33 UTC ( #637246=perlquestion: print w/ replies, xml ) Need Help??
little has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I am a bit in need of help.

Using SpreadSheet::ParseExcel ist nice but has for me one problem. Eventhough I think this interferes with the "underlying" OLE::Simple I cannot get to read an excel file if someone had set a password for any of the Worksheets conatined within the Workbook.

As I read from various but rare docs, it is that Excel will encrypt the Streams for the Worksheets using RC4 if one single password had been set.

Now I do seek help as I hope there'd be someone around who faced that problem earlier and already solved it or who might give me a shot at the right direction.

I already fumbled with ParseExcel.pm in thus adding functions to read FilePass etc. But even then whgen I know that a file had been encrypted I just got stuck.

I have no idea of what the excel ole stream actually looks like, and its sadly no option to go for an unencrypted file as the protection shall protect actually some scripts within the Workbook but every Excel app could open and read and also show the data on most of the sheets.

It would suffice my needs at all if I'd be able to "just" extract the contenst of the Worksheets and skipping the rest as I need to parse that data anyway later into another app. And as fortunate as I seem to have happen these days its also no option to ask for an csv-file. "No go" I've been told.

So, please if anybody would be up to help in solving this it would be greatly appreciated and I have to point to the fact that my boss actually could be willing to honor professional work as well.

I am looking forward to any comment.

Thanks for your teaming reading this.

Have a nice day
All decision is left to your taste

Comment on ParseExcel but decode/decrypt it
Re: ParseExcel but decode/decrypt it
by andreas1234567 (Vicar) on Sep 05, 2007 at 19:56 UTC
      Thanks for your reply andreas,
      but sadly time is a major concern, read I am not granted any.
      I have accomplished to recognize when a paswword is been set, I can determine the type of encryption. Excel uses a standard password to allow viewing in any excel app. My only but outmost the very problem is that I can not make ParseExcel to behave in any other way if I set Worksheet->{excrypted}. I would like it to then try to decrypt before continuing parsing.
      Does anyone out there have an idea or knows a tool, might also be a commercial solution, that can strip protected content and decrypt the content that is not protecetd?
      All I need is the data inside of the sheets which are not read protected.

      regards ralf

      Have a nice day
      All decision is left to your taste

        There are several Excel password recovery/removal tools out there. The only one I've ever used, however, is an Excel plugin, not a stand alone tool. I don't know if any stand alone ones exist.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://637246]
Approved by andreas1234567
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2014-07-28 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (187 votes), past polls