|
Query |
Response | |
|
Here's a pretty simple example code, in this code Width columns also is not working. |
You are first trying to set the column width to 40. Here the column width for the columns will be set as 40.
Then you are trying to auto-fit the column width for the columns. The behavior of AutofitColumns() is to set the columns width with respect to cell in the column with maximum width.
This is to inform you that the maximum column width Microsoft Excel can accept is 255 characters. Syncfusion XlsIO follows the specifications and limitations of Microsoft Excel.
Please look into the following link to know more about specifications and limitations of Microsoft Excel.
If your requirement is to maintain the column width as 40, then please avoid AutofitColumns().
| |
|
If you remove "\r\n" from the original example you'll see that the height of rows are not being changed. |
You are first trying to set the row height as 50. Here the row height for the rows will be set as 50.
Then you are trying to auto-fit the row height for rows. The behavior of AutofitRows() is to set the row height with respect to cell in the row with maximum height.
We deeply regret to tell you that we are unable to understand your query “If you remove "\r\n" from the original example”.
“\r\n” is considered as WrapText. We guess that you are mentioning to change the content of the cell.
WrapText property for the cell will be true even if you remove the “\r\n” in the content. We suggest you to set the Wraptext property to false, if you wish to avoid the WrapText.
Code Snippet:
We have modified your code snippet and prepared a simple sample. The sample can be downloaded from the following link.
Sample Link: https://www.syncfusion.com/downloads/support/forum/156612/ze/F156612_Console1484011894.zip
|