The converted data is lost

Convert PDF after less three sets of data.


Aspose.Cells Ver :8.2.2.0

Code:
var sourceFilePath = textBox1.Text;
var ext = Path.GetExtension(sourceFilePath);
var pdfFilePath = sourceFilePath.Replace(ext, “.pdf”);
var lic = new Aspose.Cells.License();
lic.SetLicense(“Aspose.Total.lic”);
var excel = new Aspose.Cells.Workbook(sourceFilePath);
try
{
if (excel.Worksheets.Count > 0)
for (var n = 0; n < excel.Worksheets.Count; n++)
{
var sheet = excel.Worksheets[n];
if (sheet == null) continue;
sheet.PageSetup.Zoom = 100;
sheet.PageSetup.Orientation = Aspose.Cells.PageOrientationType.Portrait;
sheet.PageSetup.FitToPagesTall = 0;
sheet.PageSetup.FitToPagesWide = 1;
}
excel.Save(pdfFilePath, Aspose.Cells.SaveFormat.Pdf);
}
catch { }

Hi Anni,

Thanks for your posting and using Aspose.Cells.

We have converted your Excel file into Pdf using the latest version: Aspose.Cells
for .NET v8.2.2.2
with the following sample code. We did not find any issues in the generated Pdf.

Please download the attached pdf and highlight your issues in a screenshot with red circles. It will help us look into your issues more closely and precisely and we will be able to help you asap.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\sample.xlsx”;


Workbook workbook = new Workbook(filePath);


workbook.Save(filePath + “.out.pdf”);

Hi,


I think you mean to say that the data area from T column upto AT column is not rendered in the output PDF file. The reason for cell data or contents are not rendered is due to the Print Area set for the sheet in your attached template file i.e., “N:S”, check the PageSetup dialog’s sheet tab in MS Excel. One has to set it to blank to cover all the contents of the sheet.
e.g
Sample code:
sheet.PageSetup.PrintArea = “”;

Thank you.