Free Support Forum - aspose.com

Aspose.Cells Unit Test Result

Nausherwan Aslam,

You’ve reply so fast to my first post that I feel compelled to write another one. :o)

I’ve written a unit test that tries to convert the first 100 XLS I’ve found on my computer. I’ve run this test with :
- 4.7.1
- 4.8.1 -> output 200 dpi
- 4.8.1 -> output 96 dpi
- 4.8.1.9 -> output 200 dpi

The convertion is considered OK if no exception is throw (of course) and if the number of generated images equals the number of expected images.
Some tested excel are Office 97 ones therefore each convertion error is not necesseraly a bug.

NB : SheetToImage is called with isPaginated=false

4.7.1
Test duration : 00:00:50.9826300
KO : 52
OK : 48
fastest convertion attempt duration - convertion result : 00:00:00.0018705 - OK
slowest convertion attempt duration - convertion result : 00:00:11.7347716 - KO
4.8.1 (200 dpi)
Test duration : 00:11:16.6088861
KO : 21
OK : 79
fastest convertion attempt duration - convertion result : 00:00:00.0023394 - KO
slowest convertion attempt duration - convertion result : 00:05:01.7985751 - KO
4.8.1 (96 dpi)
Test duration : 00:12:03.4630277
KO : 11
OK : 89
fastest convertion attempt duration - convertion result : 00:00:00.0023293 - KO
slowest convertion attempt duration - convertion result : 00:05:05.6998711 - KO
4.8.1.9 (200 dpi)
Test duration : 00:18:03.4749625
KO : 21
OK : 79
fastest convertion attempt duration - convertion result : 00:00:00.0023380 - KO
slowest convertion attempt duration - convertion result : 00:11:59.8798503 - KO

Conclusion
- All files that are not converted with 4.8.1 are not converted with 4.7.1 too (no regression)
- 4.7.1 sometimes makes a partial convertion (generated < expected), 4.8.1 don't
- 4.8.1.9 solves the problem I've mentionned on my previous post
- 4.8.1 is slower than 4.7.1
- 4.8.1.9 is slower than 4.8.1

This test reveals the following errors on 4.8.1.9 :
  1. Unable to read beyond the end of the stream. ---> System.IO.EndOfStreamException: Unable to read beyond the end of the stream. (see xls031.xls and xls032.xls)
  2. Buffer cannot be null. Parameter name: buffer. ---> System.ArgumentNullException: Buffer cannot be null. (see xls050.xls)
  3. Index and length must refer to a location within the string. (see xls071.xls)
  4. Word-wrap rendering problem (see xls002.xls and xls002_1.png)
  5. Unreadable text with dashed line (see xls014.xls and xls014_1.png)
Hope this helps !

Best regards,
Tetranos

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the detailed feedback and testing.

We will further look into your mentioned issues and get back to you.

Thank You & Best Regards,

Hi,

1)Unable to read beyond the end of the stream.
—> System.IO.EndOfStreamException:
Unable to read beyond the end of the stream. (see xls031.xls and xls032.xls)

They are empty files(the file size is zero). We will fix this issue.

2)Buffer cannot be null. Parameter name: buffer. ---> System.ArgumentNullException: Buffer cannot be null. (see xls050.xls)

It's caused by parsing the header/footer of the file. We will fix it.

3)Index and length must refer to a location within the string. (see xls071.xls)

It's caused by parsing the header/footer of the file. We will fix it.

4)Word-wrap rendering problem (see xls002.xls and xls002_1.png)


Please try the new fix 4.8.1.10(attached). It works better. But there is still a little difference between Sheet2Image and printing view of MS Excel. We will check it soon.

5)Unreadable text with dashed line (see xls014.xls and xls014_1.png) Both FitToPagesWide and FitToPagesTall of the page setup are 1 and the print area of the worksheet is very large , so the printing scaling becomes about 22%.


Please remove FitToPagesWide and FitToPagesTall setting of the page setup.

6)Performance convertion


Could you post the file which caused the slowest conversion? We will check it soon.



Thank you.

Find attached :
> xls051.xls
- convertion duration : 00:05:16.1932976
- convertion result : System.ArgumentException: Parameter is not valid…

> xls 078.xls
- convertion duration : 00:04:10.0751039
- convertion result : System.ArgumentException: Parameter is not valid…

Those files were created with Performance Counter Logs.
They are quite big and, as I’ve said on my first post, the isPaginated is set to false when calling SheetToImage method ; that may explain the duration.

I haven’t tested the 4.8.1.10 yet but I will try it ASAP.
Ok for the xls014.

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the template files.

We will look into them and get back to you soon. Also, we will be looking forward for your feedback regarding the latest fix provided to you.

Thank You & Best Regards,

Hi,

I’m sorry but I can’t see any difference between 4.8.1.9 and 4.8.1.10 on xls002.xls.
Aspose3.zip contains the convertion result with the two versions.

Hi,

Well, it works fine with v4.8.1.10. I have attached the generated image using the version and here is my sample code using your “xls002.xls” file.

Sample code:

Workbook book = new Workbook();
book.Open(“e:\test\unit\Aspose\xls002.xls”);
ImageOrPrintOptions imp = new ImageOrPrintOptions();
imp.ImageFormat = System.Drawing.Imaging.ImageFormat.Png;
imp.HorizontalResolution = 200;
imp.VerticalResolution = 200;
book.Worksheets[0].SheetToImage(“e:\test\unit\Test_Aspose.png”, imp);

Kindly make sure that you are using v4.8.1.10.

Thank you.

Hi,

Please try the attached version, we have fixed your mentioned issues in this fix:1,2 and 3.

Thank you.

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


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

Hi (and Happy New Year !!!),

First I would like to thank you and the Aspose.Cells team for its reactivity.

I haven’t test the 4.8.1.11 you’ve posted (I was on holiday) but I’ve try the 4.8.2 and the result is :

4.8.2 (200 dpi)
Test duration : 00:18:22.0873860
KO : 16
OK : 84
fastest convertion attempt duration - convertion result : 00:00:00.0023892 - KO
slowest convertion attempt duration - convertion result : 00:12:10.7942861 - KO

1, 2 and 3 are ok.
I still have the word-wrap problem (4) (see Test_Aspose.png).

I have created a new test app with your code :

private void button1_Click(object sender, EventArgs e)
{
Workbook book = new Workbook();
book.Open(@"X:\v2\IT_Framework\tst\MSTest\ITESOFT.FreeMind.FilesConverters.TestProject\Resources\input\XLS\xls001.xls");
ImageOrPrintOptions imp = new ImageOrPrintOptions();
imp.ImageFormat = System.Drawing.Imaging.ImageFormat.Png;
imp.HorizontalResolution = 200;
imp.VerticalResolution = 200;
book.Worksheets[0].SheetToImage(@"c:\temp\Test_Aspose.png", imp);
}

And I have verified that the 4.8.2 is loaded (see processexp.jpg).

Hi,

Kindly post your “xls001.xls” file here from which you have obtained the png (picture) of the first worksheet. We will check your issue soon.

Thank you.

Find attached a ZIP with :
- xls001.xls
- xls002.xls (you already have this one)
- Test_Aspose_xls1.png (convertion result of xls001.xls)
- Test_Aspose_xls2.png (convertion result of xls002.xls)

Regards,

Hi,

Well, it works fine with both your attached “xls001.xls” and “xls002.xls” files.

I have used Aspose.Cells for .NET v4.8.2. I have attached the generated output images using your sample code.

That look very strange to us as you are getting word-wrap issue but we do not.

Sample code:
Workbook wb = new Workbook();

wb.Open(“e:\test\wordwrap\xls001.xls”);
Worksheet sheet = wb.Worksheets[0];

ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();

imgOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Png;
imgOptions.HorizontalResolution = 200;
imgOptions.VerticalResolution = 200;

sheet.SheetToImage(“e:\test\wordwrap\xls001.png”, imgOptions);


We will further look into it.

Thank you.

Hi,

Could you :
- give me your test app binaries so that I can test it on my workstation ?
- give me an Aspose.Cells.dll which writes the assembly version in the “Evaluation Only” tag to be sure I use the 4.8.2 ?

Regards,

Hi,

We provide the API to check the version number of the product you are using. Please use CellsHelper.GetVersion() method (in the code for your project) to check/confirm whether you are using v4.8.2.0, see the document for reference: http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/check-version-number-of-the-component.html

Thank you.

I’ve changed one line of my test application to :
book.Worksheets[0].SheetToImage(@“c:\temp\xls_” + CellsHelper.GetVersion() + “.png”, imp);

The result file has the word wrap problem and is named : xls_4.8.2.0.png.

So no more doubt !

Hi,

Could you create a simple console application in visual studio .net using Aspose.Cells version, zip the project and post it here with all the files, we want to run your sample project in our environment to see if we can find out issue you have mentioned.

Also give us your environment details, OS, .NET Framework, 32-bit/64-bit or other etc.

Thank you.

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

Please try the attached latest fix of Aspose.Cells and check if it works fine for you in your system environment.

Thank You & Best Regards,

I still have the problem…

Look at the attached archive. It contains the sources and binaries of a console application that converts xls to png.
The zip also contains :
- the problematic xls (see “input” folder)
- the convertion result with both 4.8.2.0 and 4.8.2.1 (see “ouput” folder)

Test context
- Visual Studio 2008 9.0.30729.1 SP
- FX 3.5 SP1
- Windows XP Pro SP3 32 bits
- Office 2003 Installed
(need more?)

Regards

Hi,

I could not find the problem

Attached are my results(images) using your code and template files.

My test context
- Visual Studio 2005
- 2.0.50727
- Windows XP Pro
- Office 2003 Installed


We will further investigate your issue and get back to you soon.

Thank you.