Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

406
Views
Render html (or html output) to Google Drive Docs(word) using javascript

I have an project where I have to render the html form output to an new google docs(word and NOT THE SPREADSHEET !) The only thing what I can find on the internet is about spreadsheet.

The project.

I have an html with form.

I need to get all the data in a new file in google docs when i click on submit. Can someone show me a way how to solve this. Hint Links etc etc.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Try following this code:

function myFunction() {
   // Create and open a document.
   // Replace with your own document name
  var doc = DocumentApp.create('Document Name');

  var pages = doc.getBody();
  pages.appendPageBreak();
  pages.appendParagraph("A paragraph.");
  pages.appendPageBreak();//push additional data to the next page
  pages.appendParagraph("A paragraph 2.");
}

This code will let you create a document and write in the pages. Also read Document Service, this service allows scripts to create, access, and modify Google Docs files. There are alot of features you can use to make your document more presentable.

Now, you connect your form to apps script. Just follow the steps done in this tutorial. Publish your code as web app, then use the web app URL to pass the variable to your script and save the data to the document.

Hope this helps.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!