We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

GridWeb generates invalid HTML code (paddaing contains "-" as decimal separator)

Hi,

I have problem with GridWeb library. I set IndentLevel of the cell and the generated html code contains “padding-left:5,967481pt;” This causes problem because browser cannot render this correctly. The decimal separator depends on the culture of the current thread, if I set culture to EN-GB, the decimal separator is “.” which is ok.

Is it bug or should I do something to change this?

Thanks,
Karel Bem

Hi Karel,

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

Please download and use the latest version: Aspose.Cells
for GridWeb v2.7.22.2000
it works fine. It generates the “padding-left” with decimal point. We have tested it.

If you still encounter this issue, please provide us your sample project and source file and screenshot highlighting your issue with red circles. We will look into it and help you asap.

Hello,


I have tested it again with version 8.1.1.2000 and it behaves the same. If thread culture is for example cs-CZ or any culture that uses comma as decimal separator, generated html code contains all padding-left with comma as decimal separator which is not rendered well by browser. (no indenting at all)

I will try to prepare sample project but I think it must behave the same.

Regards,
Karel Bem

So, I have tried the simplest example and it behaves the same:


System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo(“en-US”);
System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(“en-US”);

var cells = gridWeb.WebWorksheets[0].Cells;
cells[1,1].PutValue(“Test value”);
var style = cells[1, 1].GetStyle();
style.IndentLevel = 1;
cells[1,1].SetStyle(style);


This works fine, but if I change culture to cs-CZ, padding-left is generated with comma as decimal place and indentation doesn´t work anymore.

Hi Karel,

Thanks for your posting and using Aspose.Cells.

We were able to observe this issue after testing it with the following code using the latest version (Aspose.Cells for GridWeb v8.2.0.2000). The indent level does not work with any other culture except US.

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-43007 - Indent Level does not work with any other culture other than US.

I have attached the screenshot highlighting this issue for a reference.

C#

if (Page.IsPostBack == false && this.GridWeb1.IsPostBack == false)

{

System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo(“cs-CZ”);

System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(“cs-CZ”);


var cells = this.GridWeb1.WebWorksheets[0].Cells;

cells[1, 1].PutValue(“Test value”);


var style = cells[1, 1].GetStyle();

style.IndentLevel = 1;

cells[1, 1].SetStyle(style);


}

Hi,

Thanks for using Aspose.Cells for GridWeb.

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

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


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

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


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

Hi,


I have just retested this issue with version 8.3.1 but it is still there. Padding is generated with comma as decimal separator instead of period (if I have set culture with comma as decimal separator).

Thank you,
Karel Bem

Hi Karel,

Thanks for your feedback and using Aspose.Cells.

Could you please review this post: 573074 and let us know if the issue description and screenshot is right so that we could ask the development team to re-investigate and fix this issue.

Hello,


yes, the issue is exactly the same. (I have set thread culture that uses comma as decimal separator and the result html contained padding values with commas instead of periods so indentation didn’t work at all)

Thanks,
Karel Bem

Hi Karel,

Thanks for your feedback and using Aspose.Cells.

We were able to replicate this issue with the latest version (i.e 8.3.2.6) with the sample project attached with this post. I have therefore reopened this issue and logged your comment in our database against this issue. Hopefully, your issue will be fixed soon.

Hi,


Please try our latest version/fix: Aspose.Cells.GridWeb v8.4.0.1

We have fixed your issue now.

Let us know your feedback.

Thank you.