Excel to HTML conversion with ExportImagesAsBase64

Hello,

I use Aspose.Cells for conversion Excel files to HTML.
In some cases I use StreamProvider to perform conversion in memory only with enabled ExportImagesAsBase64 option.

In this case, when ExportImagesAsBase64 is enabled, conversion performance has significantly decreased (2s --> 30s).

Aspose.Cells v21.9

@Andrei86,

Could you please share sample code (runnable) and template file(s) to reproduce the issue on our end, we will check it soon.

PS. please zip the files prior attaching here.

using Workbook wb = new Workbook(options.InputStream);
var opt = new Aspose.Cells.HtmlSaveOptions
{
ExportHiddenWorksheet = false,
HiddenColDisplayType = HtmlHiddenColDisplayType.Remove,
HiddenRowDisplayType = HtmlHiddenRowDisplayType.Remove,
ExportImagesAsBase64 = true
};

			if (options.UseStreamProvider)
			{
				opt.StreamProvider = new StreamProvider(options.StreamProvider);

				var mainStreamOptions = options.StreamProvider.Create(new SourceOptions
				{
					Name = "index.html"
				});

				wb.Save(mainStreamOptions.Stream, opt);
			}

File: base64_performance.zip (7.8 MB)

@Andrei86,

Thanks for sharing the file and code segment.

While evaluating your code segment, we are not sure about some objects/variables used in the code segment. We appreciate if you could provide a standalone console application, zip the project (please exclude Aspose.Cells.Dll to minimize the size of the archive) and post us, we will check it soon.

@Andrei86,

After further evaluation using simplest sample code, we found performance issue with ExportImagesAsBase64 attribute in Excel to HTML conversion:
e.g.
Sample code:

            Workbook wb = new Workbook("base64_performance.xls");
            var opt = new Aspose.Cells.HtmlSaveOptions
            {
                ExportHiddenWorksheet = false,
                HiddenColDisplayType = HtmlHiddenColDisplayType.Remove,
                HiddenRowDisplayType = HtmlHiddenRowDisplayType.Remove,
                ExportImagesAsBase64 = true
            };

            wb.Save("test_cs.html", opt);

I have logged a ticket with an id “CELLSNET-49825” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

@Andrei86

The issue is fixed in v21.11.2.
Aspose.Cells21.11.2 For .Net2_AuthenticodeSigned.Zip (5.6 MB)
Aspose.Cells21.11.2 For .Net4.0.Zip (5.6 MB)
Aspose.Cells21.11.2 For .NetStandard20.Zip (5.6 MB)

The issues you have found earlier (filed as CELLSNET-49825) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao