If you answer a number from the Google form, it will be stored in the spreadsheet with 0 at the beginning of the sentence disappeared.
Is there any way to store it in a spreadsheet with 0 left at the beginning of the sentence?
▼Tried
·Add one extra line at the top and bottom of the line where the latest answer is stored, and both format the text without formatting, but the answer remains numeric and 0 disappears at the beginning of the sentence.
·Even if you try to fill in the script editor in the form, it will become unformatted text after the beginning of the sentence 0 disappears.
vars=SpreadsheetApp.openById("xxxxxxxx";
varsh=ss.getSheetByName("Answer");
function setFormat(){
// The column C that you want to text
sh.getRange(2,3, sh.getMaxRows(), 1).setNumberFormat('@');
}
▼Prerequisite
·The number of digits of the number you want me to send from the form has not been determined (if the number of digits of the number is determined, the '@' in the above script should be '00000000000' etc.)
·As long as I know the value, I don't care about the format of the data to be stored.You can also allow certain characters to be placed at the beginning of a sentence.Example: If you answer 0012AB on Google form, you can put #0012AB at the beginning of a sentence in a spreadsheet.
That's all.I would appreciate it if you could help me.
Thank you for your cooperation.
Basically, it was impossible.
Therefore, I think it would be better for you to enter A0012AB or something with an appropriate prefix on the input side.
Also, I think it would be better to force this prefix A with input rules.
varrng = sh.getRange(2,3, sh.getMaxRows(), 1);
rng.setNumberFormat("0000AB");
Try adding
© 2024 OneMinuteCode. All rights reserved.