Hi,
I have an excel file .I converted my file to pdf .As I see my file format was corrupted.Excel columns appears in a small area in pdf. I attached my original file. And I am usind opts.OnePagePerSheet method.Maybe it can help you
Hi,
I have an excel file .I converted my file to pdf .As I see my file format was corrupted.Excel columns appears in a small area in pdf. I attached my original file. And I am usind opts.OnePagePerSheet method.Maybe it can help you
Hi,
Thank you for using Aspose.Cells.
Please download and use this latest version: Aspose.Cells for .NET v7.3.0.1. I have converted your source file into PDF using this version, and it is working fine.
I have attached the output PDF file here for your reference. My sample code for conversion to PDF is as follows:
Workbook workbook = new Workbook(“Test.xls”);
PdfSaveOptions optns = new PdfSaveOptions();
optns.OnePagePerSheet = true;
workbook.Save("Test.pdf", optns);
I tried but the result is same.I think it is a PrintArea problem.Please check with the following code
foreach (Worksheet sheet in workbook.Worksheets)
{
maxCol = sheet.Cells.MaxDisplayRange.ColumnCount - 1;
maxRow = sheet.Cells.MaxDisplayRange.RowCount - 1;
if (maxCol > 0 && maxRow > 0)
{
Aspose.Cells.
PageSetup pageSetup = sheet.PageSetup;
pageSetup.PrintArea =
"A1:" + CellsHelper.CellIndexToName(maxRow, maxCol);
}
}
Hi,
Now I have another problem If I use
int maxCol = sheet.Cells.MaxDataColumn;
int maxRow = sheet.Cells.MaxDataRow;
My excel columns were cutting when I convert my file to pdf.You can test with attachement.I attach test file for u
Hi,
Hi ,
I am using following properties now.But when I want to print my pdf (I am converting my excel file to pdf)file ,I see that the print preview version has blank fields and it is smaller than the original format.Could you please check it.I attached original file and screen shot for u
int maxCol = sheet.Cells.MaxColumn;
Hi,