January 2010 Archives

Looking for help with decryption in Spreadsheet::ParseExcel

I am the current maintainer of Spreadsheet::ParseExcel and I am looking for help from some people with an interest in cryptography in Perl.

I would like to extend Spreadsheet::ParseExcel to parse encrypted Excel files with user supplied or default passwords. This is a frequently requested feature from end users.

The problem is as follows. At its most basic level an Excel file is comprised of sequential binary records like this:

Name     Length   Data 
2 bytes  2 bytes  variable length

When the file is encrypted some additional unencrypted records are added to the start of the file to define the encryption type (usually RC4) along with some information such as salt and verifier hash. The Data segment of the subsequent records, but not the Name or Length bytes, are then encrypted.

I would like to add a function that decrypts the data block using the a password and returns the unencrypted data so that ParseExcel can continue to parse the data. There is also a class of files that are encrypted but can be decrypted without a password (or with a default password) that I would also like to be able to handle.

The encryption algorithms are reasonably well documented and I can point anyone who is interested to various sources including documentation from Microsoft. I can also provide some debugging tools and I can provide an encrypted version of the test suite.

Note, I am not interested in brute force decryption of Excel files. Only the user supplied and default password cases.

I could probably figure it out myself but I have a large number of other issues to deal with and this task would suit someone with some experience and interest in cryptography.

If you are interested drop me a line.


Also posted on Perlmonks.

Bubbles and Doughnuts and Radar

Spreadsheet::WriteExcel now supports Area, Bar, Column, Line, Pie, Scatter and Stock chart types. I think that I'll leave it at that for now and concentrate on the sub-types within those charts. Bubbles and Doughnuts and Radar will have to wait untill later. Anyone use those?

Here are some example programs with screenshots and here is the output from the Stock example:


Spreadsheet::WriteExcel with embedded charts

I've added a feature to Spreadsheet::WriteExcel to allow programmatically generated charts to be embedded in worksheets.

Here is an example which will generate something like this:


About John McNamara

user-pic Just another Perl hacker