Good afternoon,

   before print an excell file, j open a form with a TFlexCelPreviewer component in order to show what kind of print will have.

Can happend that one or more page in the preview must be delete.

There's a way to do this in the TFlexCelPreviewer component or j must close the preview form and do any modification with flexcel component or excell in order to have the rigth page to print ??

For example, in the TFlexCelPreviewer j have one sheet with 8 pages, the page 3 & 5 must be deleted in order to obtain the new preview with one sheet and 6 page to print (no change on the original excell file).

Thank's for the attention and support



There is no need to close the previewer and reopen it. Just do as follows:
1) Open the Excelfile with a TXlsFile component.
2) Show the preview form
3)When the user deletes a page, remove the sheet by calling xls.DeleteSheet(...)  and call Preview.Reload;

That should be it. Most of the modifications you want to do in the document (like margins, etc) you need to do them in the XlsFile object that is attached to the preview, and then call Reload. Those modficiations to the XlsFile object are in memory, so no changes will be made to the file in the disk (unless you choose to save them).

Hi Adrian,

thank's for your very quick reply !!!!

> 3)When the user deletes a page, remove the sheet by calling xls.DeleteSheet(...) and call

> Preview.Reload;

J work with two TFlexCelPreviewer, one "big" for the page at 100% or grater, one "small" for the total document's page(s) (Thumbnail(s)).

What j try to do is, working on the small Thumbnail(s), delete the selected Thumbnail from the list, not the page document.

So if the document has 1 long page and, in the Printing preview, j have 36 Thumbnails, is it possible delete the Thumbnail numer 18,24, 31 and print the Others Thumbnails ??

J hope yes, but j know it's no simple to do !!!

Thank you again



Sadly this isn't currently possible. It could be an interesting addition though, we'll have to study if it is feasible.