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

Free Support Forum - aspose.com

How to set padding in Gridweb Cell TableItemStyle

Hi,


How I can set padding in cell of Aspose.Cells.GridWeb?

Regards
Virendra Kumar

Hi,


Well, Aspose.Cells.GridWeb follows MS Excel standards. There is no Cell padding feature in MS Excel rather we have to set Indentation (MS Excel feature) while applying formatting for a cell. You may use/specify TableItemStyle.IndentLevel attribute.

Thank you.

Hi,


I have some values coming from XML and I want to put these value in Cells in GridWeb.
But it is taking it as string value and does not apply any default value.
How can I force it to putValue depending on datatype of the input.

e.g “$10,000.00” is shown as text value $10,000 but I want to take it as 10000 value and currency formatting by default.

Is there a method which determines datatype and formatting automatically depending on the input string.
Regards
Virendra

Hi,


I want to add Name property to a Cell ( Cell Range).
How can I achieve the same? as I also want to save this GridWeb as excel file and want to access this Name of cell.

Regards
Virendra Kumar
Hi,

virendra.ray:

I want to add Name property to a Cell ( Cell Range).
How can I achieve the same? as I also want to save this GridWeb as excel file and want to access this Name of cell.

Aspose.Cells.GridWeb does support to add named ranges in the cells. Please see the document for your reference:

Working with Named Ranges

Thank you.

Hi,

virendra.ray:

I have some values coming from XML and I want to put these value in Cells in GridWeb.
But it is taking it as string value and does not apply any default value.
How can I force it to putValue depending on datatype of the input.

e.g "$10,000.00" is shown as text value $10,000 but I want to take it as 10000 value and currency formatting by default.
Is there a method which determines datatype and formatting automatically depending on the input string.

Well, in Aspose.Cells.GridWeb, we have WebCell.Value attribute that returns an object value of the cell. The value type could be bool, DateTime, double, int, string. Also, to get the string formatted value, you may always use WebCell.StringValue attribute.

Thank you.

Hi,


I am using following code to put value in Cell
sheet.Cells[i, j].PutValue(val, true);

But this Cell is not converted to a suitable data type automatically.
Also the the value is always right aligned, unlike in Excel.

Regards
Virendra Kumar

Hi,


Could you create a simple project (with our latest version e.g v2.7.13.2xxx (GridWeb)), zip it and post it here to show the issue. We will check it soon.

Thank you.

Hi,


I am currently having version 2.7.12.2000.
Where I can get the latest version?

Regards
Virendra Kumar

I got the latest version dll.

Will try using the same.

Regards
Virendra

Hi,


Still getting the same output.

Here is the code for the same.
for (int i = 0; i < trList.Count; i++)
{
XmlNodeList tdList = trList[i].SelectNodes(“td”);
for (int j = 0; j < tdList.Count; j++)
{
if (tdList[j].InnerXml.Contains("<a “))
{
XmlNode anchor = tdList[j].SelectSingleNode(“a”);
int index = GridWeb1.WebWorksheets.Names.Add(anchor.Attributes[“name”].Value, sheet.Cells[i, j].Name, 0);
}
object obj = new object();
string val = tdList[j].InnerText.Replace(” “, “”).Replace(”\r", “”).Replace("\n", “”).Replace("\t", " ");
//obj = val;
sheet.Cells[i, j].PutValue(val, true);
obj = sheet.Cells[i, j].Value;
}
}

Hi,


Thanks for sharing the code snippet.

Your code snippet is more like a generic code and not precise, so cannot be evaluated properly. We request you to kindly create a simple project (runnable), zip it and attach it here. You may use some hard coded values that should not be dependent to any source or external objects etc. We will check your issue soon.

Thank you.

Hi,


Attached is the project for your reference.
Following is the areas which are a bit of problem for me:
1. Formatting of cell using PutValue(str_val,true). It is not converting the Cell format depending on the value given.
2. Saving Gridweb to excel removes Indent formatting.
3. Can I save Gridweb to html with formatting ?

Regards
Virendra Kumar
Hi,

Thanks for the sample project.
1) & 2)
I run your project and saved the Excel file and other html files, the numbers formatting is not rendered fine (by GridWeb) regarding different values in the output Excel file when viewing in MS Excel. We need to investigate your issue(s) thoroughly and we will do it soon. A separate ticket has been logged with an id: "CELLSNET-41239" for it. Our concerned developer will look into it soon.

3) Currently it is not supported. We have already logged a ticket for the feature (with an id: "CELLSNET-41230"). Once we have any update on it, we will do it soon.

Thank you.


Hi,


Please try the attached latest fix/version: Aspose.Cells.GridWeb v2.7.13.2003 (attached). We have fixed your issue logged as “CELLSNET-41239” now.

We have also attached the sample test Aspx file(s) and input Html file, now you may use this
method: PutValueAndSetFormatByValue to support the
requirement of converting the Cell format depending on the given value.


Thank you.

Thanks for the dll.

Will test it and revert back my comments.

I have one more doubt for MVC implementation of Aspose.Cells.GridWeb.
Is any MVC components for GridWeb control is there?
Or if you can guide me how to implement GridWeb in MVC?

Regards
Virendra Kumar
Hi,

virendra.ray:
Thanks for the dll.
I have one more doubt for MVC implementation of Aspose.Cells.GridWeb.
Is any MVC components for GridWeb control is there?
Or if you can guide me how to implement GridWeb in MVC?


Well, the MVC framework is rather more like a model view or a controller. I am afraid, Aspose.Cells.GridWeb control or any other such kind of custom web .NET control is like a webform/container which has some differences as compared to MVC Framework, so, I am afraid, it cannot be directly used on MVC. Moreover, in Aspose.Cells.GridWeb, we use "ViewState" in the code and I think Asp.Net MVC does not support "ViewState".

Thank you.

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


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