Hi All,
I have an action button that exports the docs from the view to an excel spreadsheet (template). The cells on the spreadsheet should expand as data is filled in, but they do not. I have selected the cells from the spreadsheet template, and formatted them to wrap text. I also do that from the script code, but the cell row heights still do not expand vertically as the data is filled in. Is there another parameter that I need to fill in in the code that will allow this to happen. Any help is appreciated…
Mick
Subject: Data to Excel
Try this…
With xlApp
.Range(“A7”).Select
.Selection.WrapText = True
End With
Subject: RE: Data to Excel
Thanks Jason, I tried something like that already in several different ways. Currently I am trying to use the entire column to wraptext.
xlSheet.Columns(1).Wraptext = True
xlSheet.Columns(2).Wraptext = True
xlSheet.Columns(3).Wraptext = True
The template I have already has the wraptext feature within the spreadsheet already. Interesting enough is that when you open up the template (spreadsheet) into the UI (open up Excel) and start typing text, it expands automatically. However, if I call the template from an agent, and make sure that the sheet is built in the background (visible = false), it does not automatically do it. Is this a specific characteristic only for the UI, or can I do this programmatically??
Thanks for responding…
Mick
P.S.
I did find a command that adjusts the rowheight, but how do I make this calculated amount get automatically generated, depending upon the space it would need for the largest amount of data per cell, per Row??
xlSheet.Rows(x).RowHeight = xlApp.CentimetersToPoints(35 / 10)