Content loss converting large xls file to xlsx(mainly pictures with different formatting)

While converting xls to xlsx(input size >100mb), encounter content loss.

There are 2 sheets in the input file with 2nd sheet mainly pictures with different formats, eg borders, beveled oval. First sheet is ok but second sheet pictures from row 325 to row 1260 are lost. however wording at row 1261 is being captured.

Steps to Reproduce:

  1. Prepare a MS excel of xls and xlsx, eg, example.xls / xlsx, minimally 100mb

  2. convert it to example.converted.xlsx

Sample Input file

https://transfer.sh/XYwnS/100mb2.xls

Output file

https://transfer.sh/JcMAI/100MB_17.xlsx

Some code modification:

FileStream input_stream = new FileStream(input_file, FileMode.Open, FileAccess.Read);
Document doc = new Document(input_stream);

    if (remove_macro) doc.RemoveMacros();
    if (remove_ole) {
        NodeCollection shapes = doc.GetChildNodes(NodeType.Shape, true);

        foreach (Aspose.Words.Drawing.Shape shape in shapes)
        {
            if (shape.OleFormat != null) shape.Remove();
        }
    }

    doc.Save(output_file);
    input_stream.Close();

API Version:

image.png (6.6 KB)

@alansoon

Thanks for using Aspose APIs.

We tested this issue with most recent version with the following code and it generated the correct output Xlsx file which is around 80 MB.

Please also download the output Excel file for your reference.

Download Link:

C#

Workbook wb = new Workbook("100mb2.xls");
wb.Save("output-" + CellsHelper.GetVersion() + ".xlsx");

@shakeel.faiz

Thank you for your response.

I have tried the new dll and it works now. issue resolved.

appreciated.

@alansoon

Thanks for your feedback and using Aspose.Cells.

It is good to know that your issue is resolved with the latest fix. Let us know if you encounter any other issue, we will be glad to look into it and help you further.