0

i have an ExcelWriter xlsx template that is populated via a datatable. Everything works perfectly but one column in the datatable is too large for the cell. The column is actually varchar(max) populated from text box area in a web application so the column can have multiple sentences in it. I tried to setup the xlsx template to do word wrap - and that works (kinda), but the text is still only in one cell. Is there a way to split or wrap the column across multiple cells vertically?

ham-sandwich
  • 3,975
  • 10
  • 34
  • 46
emil
  • 1
  • by the way - I can make the cell height larger in the xlsx sheet which fixes the problem ... but the business user does not like that solution. they want the text to spam multiple cell vertically with the grid lines left intact. – emil Oct 02 '15 at 19:11

1 Answers1

0

Text wrap is Excel's way of dealing with this issue. The other options are to alter your data before passing it to Excel Template so that your cell value is actually multiple rows in your data source.

If neither of these options are possible, A less desirable way might be to do some formula trickery where you store your large cell value in one cell and break it up into other cells with formulas such as LEFT MID or RIGHT

See http://www.excel-easy.com/functions/text-functions.html for some examples

Sam Plus Plus
  • 4,381
  • 2
  • 21
  • 43