How to use default excel formating in aspose.cell and pdf

How to use default excel formating in aspose.cell and pdf

Hi,


I could not understand your query. Could you elaborate if more to make us understand, so that we could reply you accordingly.

By the way, if you find any issue regarding Excel’s formatting in the converted PDF file, you need to give us both your Excel file and PDF file to show the issue here. We will check it soon.

Before doing this, I recommend you to kindly use our latest fixed version v7.0.2 if it works fine.

Thank you.

The excel and pdf files

Hi frkoffi!

Could you elaberate on the issue, we do not find issue from the files provided by you.

Thanks!

i have 3000 pages in the pdf file instead of having just 3

Hi,


This due to the fact that your template Excel file has Printable Area set for each worksheet in the workbook. For confirmation, Open your template Excel file into MS Excel, click on the second or third worksheet, open PageSetup dialog box of MS Excel, click Sheet tab and then see the huge unnecessary printable area range set i.e. “Print Area”. Well, the PDF file would be generated based on the print preview shown in MS Excel, so you got huge list unnecessary pages. Please delete the Print Area set for second and third worksheets, or you may do it using Aspose.Cells API before converting to PDF file,e.g
worksheet.PageSetup.PrintArea = “”; --> it will do the trick

Thank you.

I understand your point but with the same file, aspose.cells (version 5.0) was able to send a right PrintArea to pdf file. It determines the right print area and send it at running. We setted a huge print area because sometimes we need all thoses print area and sometimes not

maybe you may just show me how to set printarea at runtime

Hi,


Well, I am not sure how the older version works. But our new versions v7.0.x works fine and it should work what Print Preview shows in MS Excel. As, I requested you in my previous reply, kindly set each worksheet’s PrintArea to “” blank/null, it will work for your needs.

Also check on how to set printing options including printable area:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/setting-print-options.html

As a side note, if you need each worksheet will be rendered in one PDF page, you may use OnePagePerSheet attribute, see the topic (which is updated according to latest APIs):
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/render-one-pdf-page-per-excel-worksheet-excel-to-pdf-conversion.html



When i set it to null, i misses some datas in my pdf file (working with aspose 7.xx)