Problem when convert to html

After converting to html, chart is empty.
I noticed that the problem arises in the case of presence hidden column.

Here is an example:

var workbook = new Workbook();

Worksheet worksheet = workbook.Worksheets[0];

worksheet.Cells["K1"].PutValue(50);
worksheet.Cells["K2"].PutValue(120);
worksheet.Cells["K3"].PutValue(160);
worksheet.Cells["K4"].PutValue(200);

worksheet.Cells["L1"].PutValue(4);
worksheet.Cells["L2"].PutValue(20);
worksheet.Cells["L3"].PutValue(40);
worksheet.Cells["L4"].PutValue(120);

worksheet.Cells.Columns[10].IsHidden = true;
worksheet.Cells.Columns[11].IsHidden = true;

int chartIndex = worksheet.Charts.Add(Aspose.Cells.Charts.ChartType.Line, 0, 0, 20, 7);

Aspose.Cells.Charts.Chart chart = worksheet.Charts[chartIndex];

chart.PlotVisibleCells = false;

int index = chart.NSeries.Add("K1:K4", true);

chart.NSeries[index].LegendEntry.IsDeleted = true;


chart.NSeries.Add("L1:L4", true);

var htmlSaveOptions = new HtmlSaveOptions
{
HiddenColDisplayType = HtmlHiddenColDisplayType.Remove,
ImageOptions =
{
ImageFormat = ImageFormat.Png
}
};

workbook.Save("c:/test.html", htmlSaveOptions);


Hi,

Thanks for your posting and using Aspose.Cells.GridWeb.

We were able to replicate this issue using the latest version: after executing your sample code with your sample excel file. We found that if we use HtmlHiddenColDisplayType.Remove then chart is empty and if we comment this line, then chart is good.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSNET-44073 - Converting to HTML with HtmlHiddenColDisplayType.Remove creates empty Chart

I have also attached the html generated with your code with and without HtmlHiddenColDisplayType.Remove for a reference.

Hi again,

This is to update you that we have fixed the problem logged earlier as CELLSNET-44073. We will shortly provide the fix here after ensuring the quality and incorporating other enhancements.

Hi,

I use C#.
Can you provide fix for .NET?

Hi,

Thanks for using Aspose.Cells.

Please download and try the latest .NET fix: Aspose.Cells for .NET v8.6.2.2 and let us know your feedback.

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.