Printing of worksheet takes very long

Environment: Visual Studio 2005, .NET Framework 2.0, Windows XP SP3, WindowsForms Application

If I want to print a Worksheet, I have to wait nearly 2 minutes for output.
The Worksheet has only two pages with 4 polar charts an 4 line charts.
Open it in Excel 2003 and printing takes few seconds. What could this be??

Here is the code snippet: (curve.C, curve.R, curve.Z are array of double)
Workbook wb = new Workbook(@"C:\NETProjects\2009_004_KGT_Uni\Mappe2.xls", new LoadOptions(LoadFormat.Excel97To2003));
Worksheet sheet0 = wb.Worksheets[0];
sheet0.Cells.ImportArray(curve.C, 2, 0, true);
sheet0.Cells.ImportArray(curve.R, 2, 1, true);
sheet0.Cells.ImportArray(curve.Z, 2, 2, true);
wb.CalculateFormula(true);

Worksheet sheet1 = wb.Worksheets[1];
PageSetup pgs = sheet1.PageSetup;
pgs.Zoom = 100;
pgs.Order = PrintOrderType.OverThenDown;
pgs.Orientation = PageOrientationType.Landscape;
pgs.PaperSize = PaperSizeType.PaperA4;
pgs.LeftMargin = 1.5;
pgs.RightMargin = 1.5;
pgs.BottomMargin = 1.0;
pgs.TopMargin = 1.0;
pgs.FooterMargin = 0.0;
pgs.HeaderMargin = 0.0;

//Apply different Image / Print options.
Aspose.Cells.Rendering.ImageOrPrintOptions options = new Aspose.Cells.Rendering.ImageOrPrintOptions();
options.PrintingPage = PrintingPageType.IgnoreBlank;
SheetRender sr = new SheetRender(sheet1, options);
//Print the sheet.
//sr.ToPrinter("Microsoft XPS Document Writer");
sr.ToPrinter("Amyuni PDF Converter");

Hi,

Thanks for your interest in Aspose.Cells.

Please provide us your source (Mappe2.xls) file, so that we could run your code and investigate this issue.

Here is the excel source

Just try opening and printing Worksheet[1].

I have tested printing also with Microsoft Office Document Image Writer and real Printers,
but always the same. I have also restarted my PC to check, wether there are driver problems,
but this doesn’t solve the problem.

Thanks

regards

Hi,


Thanks for your sample file and source code.
We have experienced the same performance issue while printing the worksheet using latest fix version of Aspose.Cells for .NET v5.3.3.3. So we have logged an Investigative Ticket for this issue. The Ticket ID for your reference is CELLSNET-28168.
We will keep you posted here.

Hi,


We have released a fix version of Aspose.Cells for .NET v5.3.3.5 [attached]. I have noticed that the performance issue that you have mentioned in this thread has been taken care of in this release. The time consumed to print your given excel file has been reduced to half while printing in XPS format. Please test your scenario with actual printer and let us know of your results.

C# Code:

Workbook wb = new Workbook(@“C:\temp\Mappe2.xls”, new LoadOptions(LoadFormat.Excel97To2003));


Worksheet sheet1 = wb.Worksheets[1];

PageSetup pgs = sheet1.PageSetup;

pgs.Zoom = 100;

pgs.Order = PrintOrderType.OverThenDown;

pgs.Orientation = PageOrientationType.Landscape;

pgs.PaperSize = PaperSizeType.PaperA4;

pgs.LeftMargin = 1.5;

pgs.RightMargin = 1.5;

pgs.BottomMargin = 1.0;

pgs.TopMargin = 1.0;

pgs.FooterMargin = 0.0;

pgs.HeaderMargin = 0.0;


//Apply different Image / Print options.

Aspose.Cells.Rendering.ImageOrPrintOptions options = new Aspose.Cells.Rendering.ImageOrPrintOptions();

options.PrintingPage = PrintingPageType.IgnoreBlank;

SheetRender sr = new SheetRender(sheet1, options);

System.Diagnostics.Stopwatch stopWatch = new System.Diagnostics.Stopwatch();

stopWatch.Start();


//Print the sheet.

sr.ToPrinter(“Microsoft XPS Document Writer”);


stopWatch.Stop();

// Get the elapsed time as a TimeSpan value.

TimeSpan ts = stopWatch.Elapsed;


Console.WriteLine(ts);

Console.ReadKey();

Hi,


Thanks for the quick response!
It runs faster now, but is there a possibilty to get it still faster (like Excel). Maybe
with redesigning my Excel file, directly save worksheet to PDF or similar.
Furthermore I noticed, that the page is a little bit stretched (radar circle is not round, fonds are smaller)
and the the axis lables are not right (1,2,3,4 instead of 0, 90, 180, 270).
The two charts on the second page are not printed. What could this be?

Background is, our customer want to design his own report with excel and transfer it to
the production system (WYSIWYG). He expects the same appearance like on his office PC.
On the production system, we need the measurement reports quickly, because of production performance.

Thanks for your help!!

Hi,


Regarding the performance issue, I have logged your comments to the Ticket already associated with this thread.

Regarding other issues that you have mentioned, I have logged a separate Ticket for it. The Ticket ID for your reference is CELLSNET-28414. Below is a list of differences that I could find between Aspose and Excel generated XPS files [both are attached for your reference].
  1. Image is stretched so the radar charts seems to be slightly oval.
  2. See snapshot chartAxis.png. The axis for all the charts are different that orignal Excel File or Excel generated XPS file.
  3. On page two of Excel.xps file, there are four charts that are missing in Aspose.xps
We will keep you posted on this.

Hi,


Thanks for your information.
I have got an email that you have improved performance and
fixed some bugs in radar chart drawing,
but I can’t find a new version of Aspose.Cells.dll.

Where can I download it?

Thank you

Hi,

We are sorry for inconvenience. We are still working on your issue. After some investigation, we found there are still issues, so we could not provide you a fix. Once, these issues will be resolved. We will again post here.

Hi,


Thank you for your patience.

We have just release Aspose.Cells for .NET v6.0.0.1. In which, we have improved the performance of printing. Also we have addressed several other issues as logged in our Database under Ticket ID CELLSNET-28414.
Except one issue that we can not solve is related to difference of Axis Labels in printed copy.

Please test your requirements with latest assembly and let us know of your feedback.

The issues you have found earlier (filed as 28414) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.