How can disable multiline option in excel cell level



When i load excel in aspose control, It allowing to enter more than one line,How can i disable this option?

Regards,
Nandha.

Hi,


I think you are talking about Aspose.Cells.GridWeb control. Well, you may try to set the Wrap attribute to “false” of the cell’s style, see the sample code snippet for your reference:
e.g.
//…
Aspose.Cells.GridWeb.TableItemStyle s = sheet.Cells[x,y].GetStyle();
s.Wrap = false;
sheet.Cells[x, y].SetStyle(s);

Thank you.

Thanks for your response Amjad Sahi,

I dont want to set style cell wise,
is there any option to do with control level?

Hi,


I am afraid, there is no such option available to disable word wrapping options in one go. I think you may simply create a style object and set the Wrap attribute to false, then loop through your matrix (rows and columns) and set the style accordingly.

Thank you.

Hi Amjad,

Our exce having more than 20 sheets each one have 400 rows of data,
if we implement we will face performance right. kindly let me know is any other option to deal this in one go.

Thnaks,
Nandha.

Hi,

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

We think, you will have to use the approach mentioned by Amjad to get rid of this problem. There is no alternative to it and you cannot solve it in one go.