Hi Team,
We are encountering an issue with Excel export in SmartGWT 13.1 EE where row heights are expanding unexpectedly, even though the column widths are already auto-expanded to fit the content.
Observed Behavior
Analysis
Based on our understanding, this seems to stem from Excel’s rendering behavior:
Expected Behavior
Since the column width is already expanded to fully accommodate the content:
Questions
Environment
Thanks in advance for your help!
We are encountering an issue with Excel export in SmartGWT 13.1 EE where row heights are expanding unexpectedly, even though the column widths are already auto-expanded to fit the content.
Observed Behavior
- Column widths are correctly auto-expanded based on the longest value in the column (this works as expected).
- However, for certain rows, the row height increases unnecessarily, while the cell content is still displayed on a single line.
- This occurs even though:
- There are no explicit line breaks (\n, <br>, etc.) in the data.
- The content is a single continuous string (for example, an address field).
- Notably, this behavior appears to be triggered by very small differences in content length:
- Removing even a single character (e.g., changing "USA" to "US") causes the row height to return to normal.
Analysis
Based on our understanding, this seems to stem from Excel’s rendering behavior:
- Even after auto-fitting the column width, if the rendered text slightly exceeds Excel’s internal pixel boundary, Excel pushes part of the text to the next line.
- This results in an increased row height, even when text wrapping is not explicitly enabled.
Expected Behavior
Since the column width is already expanded to fully accommodate the content:
- Word wrapping should not occur.
- Row height should remain consistent (single line per row).
- The uneven expansion of row heights creates a poor user experience for customers.
Questions
- Is there a supported way to completely disable word wrapping in Excel exports?
- Can the export logic ensure one of the following:
- Slightly increased column-width padding, or
- Strict single-line rendering that prevents row height expansion?
- Are there any recommended export settings or attributes to avoid this behavior?
Environment
- SmartGWT Version: 13.1 EE
- Export Format: XLS
- We have already tried setting exportWrapCells=false, but it does not appear to have any effect.
Thanks in advance for your help!
Comment