When you say metadata, you’re referring to the fields like “created by”, “modified date”, etc… correct? Why can’t you access them? Out of curiosity, why do this in a Web Part? I would think it would be much easier doing this with a console app or something of the like. You should be able to obtain the attachments… are you saying it’s not possible or that you’re having trouble getting it to work?
The Excel thing was a shot in the dark… worth a shot though!
I’m sure this can be done without querying the DB.