I'm using EasyXLS for C#.NET. Does it support Autofit of a column like real Excel does? I see wrap text, but no Autofit. Am I missing it somewhere?
Mon Jul 16, 2007 12:53 pm
daniela
Joined: Fri Feb 03, 2006 12:23 pm Posts: 199 Location: Brasov, Romania
By default, if the row height and column width are not specified, they are automatically sized with the cell content.
If the wrap property is applied the autofit is ignored.
If somehow the column width is specified, for example after a load action (when the column widths are set), by setting the column width to -1, the column width will be automatically sized with the cell content.
Tue Jul 17, 2007 2:23 am
amit.nayar
Joined: Mon Jul 16, 2007 12:52 pm Posts: 3
Thanks for the response, but I'm not seeing this behavior. I have some code like this:
Code:
// write huge numbers in column D double num = 1000000000000; int colD = 3; for ( int row = 0; row < 10; row++ ) { num += 1; xlsFirstTable.easy_getCell( row, colD ).setFormat( "[$-409]#,##0.00;([$-409]#,##0.00)" ); xlsFirstTable.easy_getCell( row, colD ).setValue( num.ToString() ); }
The width is not sized correctly. It comes out with #### signs when I open the document in Excel.
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum