Export as a single image


First of all, great product! One of the best Excel components around for a bargain!

Is there a way to export an Excel sheet as a single image? I'm working with some fairly large sheets, in terms of dimensions, and I need the full range within the sheet exported as a single image. Can this be done with the current implementation of FlexCelImgExport?

Thank you in advance for your reply!



Thanks for the kind words, we really appreciate them :)

About FlexCelImgExport, yes, you can use it to export into a single sheet, but beware of the dimensions, since numbers of pixels grows in n^2 and you might easily get files too big to handle.

Anyway, to export a full sheet in a single file, you just need to make the paper size big enough so it all fits in one page, and also clear all manual page breaks on it. That is, call:

before exporting. We don't have a simple way to calculate the needed paper dimensions, but with a little help of a TClientAnchor object, we could define CalcPaperDimensions to be something like this:

But as said, don't abuse it. You might end up with very big bitmaps very soon. Maybe you can use a Mutipage TIFF instead? While still an image, it is subdivided in pages, so not everything has to be loaded in memory at once.


Hi Adrian,

Thank you for your swift and elaborate reply. I am going to try your solution right away!

Kind regards,