3

I had a working Google Spreadsheet where when new responses were filled in on the form, they would automatically get textwrapped on the Form Responses sheet.

Now recently I had to remake this spreadsheet and I just can't seem to figure out how to do that, automatically that is.

I know about 'paint format' and the textwrap button itself but I need it to do that automatically so I don't have to keep manually doing it myself.

I read about QUERY and ARRAYFORMULA but I can't get it to work.

3

The only way I found to do this is with a script.

Step 1: Go to Tools > Script Editor and put the following code there:

function wrap(e) {
  e.range.setWrap(true);
}

Step 2: Still in Script Editor, go to Resources > Current project's triggers, and select from dropdowns "wrap", "From spreadsheet", "On form submit".

NOTE: If under Resources you have no current project triggers - create a new one - name it "wrap" - then proceed to choose "From Spreadsheet", "On Form Submit" and it will work as stated.

Step 3: You're done. Close the Script Editor. The new form submissions will be automatically wrapped in the spreadsheet.

2
  • This worked. Thank you very much! – Chloe Jan 10 '16 at 22:22
  • This no longer works. – brooklynsweb May 17 '20 at 16:17
1

With updated AppScripts (DEC 7 2020 version)

Step 1: Go to Tools > Script Editor and put the following code there:

function onEdit(e) {
  var range = e.range;
  range.setWrap(true);
}

Step 2: Still in Script Editor, go to Edit > Current project's triggers, and + Add Trigger, "onEdit", "Head", "From spreadsheet", On open, > Save.

Step 3: You're done. Close the Script Editor. The new form submissions will be automatically wrapped in the spreadsheet.

2
  • This no longer works. – brooklynsweb May 17 '20 at 16:16
  • @brooklynsweb updated, thank you! – jparagon Dec 7 '20 at 22:43
-1

@jparagon 's December 2020 edit worked, but I had to set the trigger to be "onEdit", "Head", "From spreadsheet", "On form submit" (instead of "On open") in order for it to automatically wrap text upon a new submission to the form. Additionally, at the end of Step 1 in the answer above, you have to save your script in the Editor tab before it will allow you to do anything in Step 2 in the Triggers tab.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.