Hi,
Thanks for your feedback and illustration.
I can notice the issue with your file, we will investigate how this issue could be be resolved.
Once, we have some update for you, we will let you know asap.
Below is a screenshot for a reference.
Screenshot:
Hi,
To further help you understand the difference in this implementation(from earlier example).
AllQuestions-TopBox(25-06-2012)(11).xls contain 3 spreadsheets
1) Visual Report 2) Sample size 3) Top Box %
Visual Report picks up data from 2) and 3) spreadsheets but even when data is not there in pdf page 2, it is showing 257 pages(Screen1.jpg)
Below lines does not give appropriate solution as shown in the earlier conversation screenshot.
ws.PageSetup.FitToPagesWide = 1 and ws.PageSetup.FitToPagesTall = 0
code :–
ws.HorizontalPageBreaks.Clear();
ws.VerticalPageBreaks.Clear();
ws.PageSetup.PrintArea = null;
//Aspose.Cells.Style styles = new Aspose.Cells.Style();
//styles.IsTextWrapped = true;
//Aspose.Cells.StyleFlag sfalgs = new Aspose.Cells.StyleFlag();
//sfalgs.WrapText = true;
//ws.Cells.ApplyStyle(styles, sfalgs);
ws.Cells.SetColumnWidth(0, 30);
//ws.PageSetup.FitToPagesWide = 1;
//ws.PageSetup.FitToPagesTall = 0;
ws.AutoFitRows();
Thanks,
Nagamani
Hi,
Hi,
Thanks for using Aspose.Cells
Please note, your issue has been logged with the id: CELLSNET-40782
We will look into your problem and update you asap.
Hi,
The cells in the range A11:DS685 are not empty. If you do not set the print area, the default pint area is A1: DS685, so the print preview is very small when you want to print so many columns to one page.
If you just want to print the area with data, please try the following code:
I have attached the screenshot for your reference.
C#
string filePath = @“F:\Shak-Data-RW\Downloads\AllQuestions-TopBox(25-06-2012)(11).xls”;
Workbook workbook = new Workbook(filePath);
Cells cell = workbook.Worksheets[“Visual Report”].Cells;
string pArea = “A1:” + CellsHelper.CellIndexToName(workbook.Worksheets[“Top Box %”].Cells.MaxRow, workbook.Worksheets[“Top Box %”].Cells.MaxColumn);
workbook.Worksheets[“Visual Report”].PageSetup.PrintArea = pArea;
workbook.Save(filePath + “.out.xls”);
Screenshot:
Hi Team,
Thanks for your reply.Few things we have noticed is
1.The screen shots which you have attached is not the desired output format ,We want all the columns in a single page, but in the screen shots which you have provided 2 columns are in one page and next 4 columns are in another page.
2.We have tried the solution which you have suggested us.But the out put is still same,except for PrintArea added extra at the end of “Visual Report”.Thus results in duplicate data.Please find the attached file.
Thanks
Nagamani.
Hi,