The problem is you are using clear() to clear the form data. You should be using clearContent() . Clear wipes out the data and formatting, whereas clear content only removes the data within the cell.
Change those and you will not have to worry about formatting again.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-script-community/4ace291c-522c-4fe4-b1cc-75e6c2559263n%40googlegroups.com.
Alice,
Just FYI. Gemini is awful. It is wrong more often than it is right. It has given me deprecated code and code that is non-functional.
Claude AI is awesome. It's never let me down.
FYI
Keith
Yes. Claude is, as far as I've seen, the leader in AI coding.
Michael,
Amen. I don't consider myself anything more than a hobbyist coder with regard to apps script but every time I use Gemini it gives me wrong code. And that's pretty bad when somebody is low on the coding spectrum as I am, can tell that Gemini is just giving bad information. I can't tell you how many times it has written code for me and given me deprecated code or JavaScript that's not supported by apps script. Gemini has infuriated me more times than one and I don't even consult it anymore.
Claude - on the money every time.
I recently asked Claude for best practices with regard to apps script lock service and he gave me a really fantastic lock wrapper - which I put here on the community for review. Works great!.
Cheers
Keith