Agreed. I bought a book on this stuff and I always seem to get errors I can't fix. I love your authenticity, honesty, making mistakes. It's very human and incredibly good learning, from one teacher to another!
I love You, I love the way you explain things, I love the amount of useful things you teach using Google Apps, I love How you release a video teaching exactly what I need to implement over here. I've been waiting so long for this video in particular. If, possible, you could make some videos about integrating Google Forms with Google Contacts.
@@ExcelGoogleSheets Create and update contacts on google platform. Like, What I want to do is to gather costumers info through a google forms, save this info in a spreadsheet and create a contact. If this contact has already been registered update it.
@@fernandobrito5316 @Learn Google Spreadsheets Yes! I was thinking the same thing watching this video. For me, as a self-employed guy, writing bills is a really tedious and I am implementing the technique in this video to automate bills via spreadsheets. It would be really awesome to learn about interconnectivity between google contacts and google spreadsheets. Like how to import in and export from sheets to contacts and vice versa. Why? The "autofill" function in gmail, or to give customers access to specifics sheets for example, only works, if you have the email adress saved in google contacts (afaik). PS: Thanks for your work - really appreciate it!!
This is the video about integrating Google Forms with Google Contacts. ruclips.net/video/ISHALBY-w54/видео.html Thank you so much @Learn Google Spreadsheets for creating the video, and thanks for @ Fernando Brito for the idea.
May I ask a quick question. I am trying to export individual rows from a product catalog. The catalog has images stored in a cell. Is it possible to load that image into the template as well? I saw you using a different function to get the dollar symbol, so similarly does loading an image require a new function?
This is SO SO SO helpful! It's exactly what I needed to get things done for my new business, thanks so much--as a non-software language person, this broke everything down the way I needed to "get" it. I've subscribed and will be working my way through your videos, and hopefully will find a way to thank you that's remunerative, soon. Thanks so much again!
Thank you so much! You've just freed me from third-party extensions, and made me more independent in creating certificates. Ps.: I'm #Brazilian and I used the automatic translator, sorry for the mistakes.
If you have trouble with "MimeType.PDF" - replaced "tempFile.getAs(MimeType.PDF)" with "tempFile.getAs('application/pdf')" and it will work like a charm. Thanks for the great content!
The video used the script editor to create the pdfs. I do not have script editor, but do have app script. I followed along pretty well until about 11:45 minutes into the video. At this point we are trying to get the file as a pdf. The syntax between the 2 scripting sources is different and I get an error. The getas.(Mimetype) does not recognize in Appscript. Any suggestions on altered syntax?
Hello @learn Google Spreadsheets, I would suggest renaming this video to show it is different video from the other PDF video you created. So, this is more a 'Bulk' email AppScript, rather than 'onSubmit' form video. This will be better for users to find the correct information. Your videos are great. I implemented your solution without problems. The Google Permissions approval process has changed.
I'm stuck on minute 25:14 and I'm getting this error message: TypeError: Cannot read property 'getSheetByName' of null (line 6, file "Code"). This is what my code looks like: const currentSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Renewals"); what am I doing wrong :(
thanks for the useful information. I have a question, if i store the pdfs in google drive and i want to share it with other people, can you modify the program so, it not only create the pdfs, but also generate the personalized pdf link to the selected cell.
great videos, all so clearly explained. I would need to add to create bulk PDFs the possibility of returning the pdf link for each row. Is there a video showing this? My data are not being added through a form. Thanks
I used this tutorial and in 2h I made it to work without any problems, interface from google has changed a little bit here and there but it all works and its not hard to do and follow, THANK YOU!!!
This is fantastic, thanks so much! ...Is there a way to include an image (any file format) in the data transfer? For a form I have images of a written signature included in the form questions, but when I put them in a column in the spreadsheet and run it though this program, in the resulting pdf it doesn't place the image but just prints the text "cellimage."
Duplicates the old ones, adds the new ones. Great question! I would like to know how NOT to create duplicates. I'm using this to create contracts. I suppose you could create the PDFs and then move the data to another sheet after completion. Seems unnecessary, though. Perhaps, setValues Done and use if...then? Or have it check the Done column first before creating the PDF?
I really love ur channel thank you very much for all your lessons, U R the best one thing in this lesson : When you Remove the temp file titeld "copy of template" from (Temp Folder) it goes to ROOT not to Trash i've added this Function between the original two functions: function trash() { var files = DriveApp.getFilesByName("Copy of template"); while (files.hasNext()) files.next().setTrashed(true); then added : trash(); in the end of the last function , after this line: tempFolder.removeFile(tempFile); It woorks fine But , now we have to empty the trash manually is their any wayTO EMPTY THE TRASH Automatically in the end of these scripts?
You have to use advanced Drive API service to be able to delete without clearing the trash. You can't do it with regular Apps Script DriveApp service, at least not at the moment.
Thanks for this modification! Accidentally found bunch of template files in ROOT folder and didn't manage to find where they came from. I modified this script by my needs a lot, so thought that some of mine script lines creates duplicates of template in ROOT folder. I had no idea that these copies come from temp folder. Your solution works great. Thanks :)
God bless you man. I think sometimes you read people's mind, this was a life savior video as it came out the right time we needed it to generate acceptance letters to email to students. Keep up the good work.
how did you make the second function run even so you picked the first function to run? what did you use to call the second function to the first function?
Can u explain how to use image stored as url in column to create pdfs? Example: I have signature stored in column K as google drive links and I want to fetch image from that url to create pdfs
Can we use sheets to populate user access accounts (with admin / general / guest permissions) to be used for people to log-in on a #GoogleSites webpage we may create?
Awsome, one question i did include a code for automatic Send an Email bot i dont know how to get that created PDF as an Attachment into the Mail so i dont habe to resend all the Invoices again bot do it all at onec with one Click.
Excellent tutorial. Question: since you use the script to create a new file and name it in drive, is there a way to create a link to the newly created file in a cell in the sheet?
Hey, your tutorials are amazing. Will you also please share the code which you write in the video. I have seen your website but there is nothing available regarding this code. :(
"tempFolder.removeFile(newTempFile);" didn't really delete the file for me. It moved the file away from tempFolder then place it in My Drive instead of deleting it. I tried to comment the line out and run the script. Found that newTempFile still in tempFolder meaning it's created under the proper directory. Some how it's moved to My Drive when removeFile is executed. Weird! I ended up using this "DriveApp.getFileById(newTempFile.getId()).setTrashed(true);" and I cannot find the newTempFile anywhere anymore. Hope my finding can help someone!
Nice just 1 question. Instead of using the button to run the code. Can i run and create the pdf each time i fill out a google form which then populates the google sheets row? Also if it can be emailed to a specific email?
Would love to see a tutorial on printing out or exporting ranges to PDF or maybe image files, too. :) This would really be useful since there's currently no easy way to do this with code. Thank you so much for your great videos!
Do you know why my PDFs print with the values (i.e. {first})? The only hint I have is that I noticed the google doc preview pane also shows the values (i.e. {first}, but when I open the doc, the correct values show. It takes a while, but the preview pane finally updates to show the correct values, but only after opening the doc manually and letting a few minutes pass by. Strange.
This video has been so helpful! Thanks so much! I am trying to now get the URL of each created PDF to appear in the spreadsheet so that I can then send the link in an email. I have watched your other video that shows how to do this using data from a google form, but is there a simple set of code that can just be added to the code created in this video? Many thanks in advance.
Firstly, amazing video thank you. Secondly, if I wanted to add in script that whenever I click the 'Create PDFs' button in the spreadsheet, it only runs the script and creates PDFs based on new data that has been added to the spreadsheet and not old/already processed data, how would I go about doing that?
Hi, The app script works fine. Just a couple of issues. No1 . It creates a copy of the Template file in my Drive root directory. No 2. It times out after around 50 records, whereas I have the data for 900 records. Can you suggest a way to get around these issues ? Thanks in advance
Hi, I hope you can still see this comment and can hopefully answer my question: Is it possible to edit the content of the textbox instead of the body? I'm trying to follow this but the text that I want to change is not located in the body but in a textbox.
If I would like to export pdf from google sheet (invoice template) but there are several invoice number which need to be manual select from drop down list. Do you have any idea to automate select invoice number and also automate export to pdf file ?
Thank you so much for all your tutorials, I´ve learned a lot these years with them. I was wondering if this function will work for any user that the spreadsheet is shared with. I´ve tried different ways to get a google docs for the last row of a spreadsheet and so far, only I can use it; other users that have edit access to the sheet and shared the drive folder where the doc files are stored always get an error when trying to generate the doc. Do you have an idea of what I´m missing?
Thank you for this clear brief tutorial. How about if i have a URL in one of the field, what should I put instead of replacetext? If you can send us how, it would be very helpful, thank you.
Is there a code that would autogenerate a new pdf everytime a new row is added? Also what is the link to the video to see how to send the pdf to email. Im looking to integrate this with some mobile ordering systems that use google sheets and every time a new order is created it creates a new row and then I would like it to create a pdf to then send it to email for a order printer in say resturant kitchen
Hi! I need help if this is possible, basically I copy this concept to create a PDF and i want to send it as well via email. my challenge is I need to put an if statement based on a specific column,. like if the specific column Z is blank then create a PDF. I hope you could help me.
How would: const data = currentSheet.getRange(2,1,currentSheet.getLastRow()-1,4).getDisplayValues(); be if I only wanted one pdf to be created out of the law row that has been added content into? This would be useful because I would be generating only one pdf at a time not 3 at once.
how we can get just create a pdf for specifc rows that we want, kind of choice it first, or for a specific rule, maybe for the date. for exemplo, I have every day some new data, so today I want to generate some pdfs for data from yesterday... Thank you for videos, they are pretty awsome!
Thanks for the informative video,it really helped me to get the automation i wanted to do from very long,i have no idea about java and any sort of scripting,but your explanation made it very easy to understand.big thanks
Hello, do you know why is my getAs PDF file still contains {First Name}, {Last Name}, and {Amount}, instead of the replaced one? I followed your steps, and tried to replace the tempFile with tempDocFile and it didn't work either. Thanks before!
How do I get a pdf from an especific row data? example: Let's say I want to get a pdf for Ana Brown only and I want to be able to get that pdf by changing somemthing like a dropdown that says "Create PDF"
Just doesnt work. When I start the bulk pdf part of the coding I run it and get these constant error messages. Its so frustrating! createPDF @ Code.gs:16 (anonymous) @ Code.gs:10 createBulkPDFs @ Code.gs:9 with the exception of having more that 3 columns of data, I have followed along verbatim. Can anybody point me in the right direction?? Please 25:21
Thanks for all the content so far ! Im using extension to doing the same thing , which is whenever a google form submitted it will generate a pdf email. Wonder is this works by writing scripts from a newbie like me ? As the chrome app is not supported anymore end of this year...
Hi, hope you can help, this just what I been looking for, but I am getting a "TypeError: Cannot read property 'getRange' of null createBulkPDFs @ Code.gs:8" and I can not work out why? cheers
would it be possible to create pdf for a particular row in the spreadsheet. Problem statement: i have some 100 rows but i dont want to create pdf for all 100 rows but just for one one row. would it be possible to write a code in that manner. also for each row i will have a checkbox, will i be able to generate a pdf as soon as the checkbox is ticked. would it be possible to write a code in that manner?
I am not able to change fields in bulk pdf nd not able to create pdf files too.what should I do word files are getting created but not able to create pdf nd change each row name in word file
In your previous videos you used to use var instead of let and const, why did you change it here? And I understand you try to use them as variables but what are you using 2 different things there? Thank you for awesome contents!! Please keep up the great work!
Since JavaScript engine was recently updated we can now use "const" and "let" to declare variables. In this particular case you could just replace all of them with "var" and it would work just fine as well. "const" means it's constant, so it can not be changed to something else later in code, so it's not really a "variable", even though that's what I call it. "let" is a long story :)
Hi! This has been such a huge help for me. Thank you for your amazing tutorials. We receive applications at my organisation using Google Forms. From there the data gets saved into a sheet and I want to then save PDF summaries of those applications. Your tutorial has allowed me to achieve this. The one thing I would love to be able to do in addition to this would be to now allow for duplicate files. The way the code works now, it creates PDFs for all rows each time the script is run. I'd love to be able to run the script and only create new PDFs for new application responses without creating more and more of the same. Do you have any advice on how I can find out how to do that?
@@mayash7604 Hey, you would need to change the code that's getting all the rows to getting the last non-empty row. Then use the trigger tab to run the script every time a new row is added
I feel like I should pay for watching this. Outstanding quality.
Agreed. I bought a book on this stuff and I always seem to get errors I can't fix. I love your authenticity, honesty, making mistakes. It's very human and incredibly good learning, from one teacher to another!
then donate on Patreon.
Shhh! He might hear.
just do it.. buy a thanks ..
You are the best Teacher for Google Apps Script with Spreadsheets
What an incredibly lucid tutorial. When it comes to the best at explaining tech on RUclips, there is this guy and Bob Traversy, then everyone else.
My mind has just been blown. Thank you so much for the in-depth explanations. You have probably saved me months worth of work.
Great to hear!
@@ExcelGoogleSheets
Did you have Courses Online about app Script google sheet
@@ExcelGoogleSheets hi, can i still use the removeFile method? cos it now says that this method is deprecated. thanks
I love You, I love the way you explain things, I love the amount of useful things you teach using Google Apps, I love How you release a video teaching exactly what I need to implement over here. I've been waiting so long for this video in particular.
If, possible, you could make some videos about integrating Google Forms with Google Contacts.
This might be a stupid question, but what does Google Contacts do?
@@ExcelGoogleSheets Create and update contacts on google platform. Like, What I want to do is to gather costumers info through a google forms, save this info in a spreadsheet and create a contact. If this contact has already been registered update it.
@@fernandobrito5316 @Learn Google Spreadsheets
Yes! I was thinking the same thing watching this video. For me, as a self-employed guy, writing bills is a really tedious and I am implementing the technique in this video to automate bills via spreadsheets. It would be really awesome to learn about interconnectivity between google contacts and google spreadsheets. Like how to import in and export from sheets to contacts and vice versa. Why? The "autofill" function in gmail, or to give customers access to specifics sheets for example, only works, if you have the email adress saved in google contacts (afaik).
PS: Thanks for your work - really appreciate it!!
This is the video about integrating Google Forms with Google Contacts.
ruclips.net/video/ISHALBY-w54/видео.html
Thank you so much @Learn Google Spreadsheets for creating the video, and thanks for @
Fernando Brito for the idea.
So gay .. 🤣
This is Wagner, speaking from Brasil. Simply amazing your videos! Thank you for taking your time teaching us!
you are a saviour.. automated 70% of my department work from your channel
World's No 1 Channel
World's Best Teacher
World's Best Quality
Learn Easy and Understand
I Love And Like All Video
All Video Is Heart 💓 Touching
May I ask a quick question. I am trying to export individual rows from a product catalog. The catalog has images stored in a cell. Is it possible to load that image into the template as well? I saw you using a different function to get the dollar symbol, so similarly does loading an image require a new function?
Could you take this a step further and show how to automatically send PDF file to a given email after it was submitted through google form?
This is SO SO SO helpful! It's exactly what I needed to get things done for my new business, thanks so much--as a non-software language person, this broke everything down the way I needed to "get" it. I've subscribed and will be working my way through your videos, and hopefully will find a way to thank you that's remunerative, soon. Thanks so much again!
4:05:35 PM Error
TypeError: Cannot read property 'getRange' of null
createBulkPDFs @ Code.gs:7
I got this message when i run scipt
You need to change the spreadsheet tab name from "Sheet 1" to "people".
At 17:53 you explain that it's better to create a new object, is that done by creating a new function?
Thank you so much!
You've just freed me from third-party extensions, and made me more independent in creating certificates.
Ps.: I'm #Brazilian and I used the automatic translator, sorry for the mistakes.
If you have trouble with "MimeType.PDF" - replaced "tempFile.getAs(MimeType.PDF)" with "tempFile.getAs('application/pdf')" and it will work like a charm.
Thanks for the great content!
for me it creates PDF from initial template doc file, not from copy with replaced data. any ideas?
@@ДмитрийПаравин Sounds like you have a bug somewhere around binding data. follow the tutorial correctly step by step and you will succeed
@@itamarnakar6698 thanks for reply. i see that another user here have the same problem. may be something in google script was changed?
@@ДмитрийПаравин it s working like a charm in the new script
The video used the script editor to create the pdfs. I do not have script editor, but do have app script. I followed along pretty well until about 11:45 minutes into the video. At this point we are trying to get the file as a pdf. The syntax between the 2 scripting sources is different and I get an error. The getas.(Mimetype) does not recognize in Appscript. Any suggestions on altered syntax?
do you have the solution for this problem?
Hello @learn Google Spreadsheets, I would suggest renaming this video to show it is different video from the other PDF video you created. So, this is more a 'Bulk' email AppScript, rather than 'onSubmit' form video. This will be better for users to find the correct information. Your videos are great. I implemented your solution without problems. The Google Permissions approval process has changed.
have you had trouble on line 10
const = tempfile = docFile.makeCopy(tempFolder);
keeps returning docFile.maleCopy is not a function
I'm stuck on minute 25:14 and I'm getting this error message: TypeError: Cannot read property 'getSheetByName' of null (line 6, file "Code"). This is what my code looks like: const currentSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Renewals"); what am I doing wrong :(
Thanks!
Thank You!
thanks for the useful information. I have a question, if i store the pdfs in google drive and i want to share it with other people, can you modify the program so, it not only create the pdfs, but also generate the personalized pdf link to the selected cell.
Great stuff! Everyone who uses Google Sheet/Excel should be on your channel!
Thanks!
great videos, all so clearly explained. I would need to add to create bulk PDFs the possibility of returning the pdf link for each row. Is there a video showing this? My data are not being added through a form. Thanks
I used this tutorial and in 2h I made it to work without any problems, interface from google has changed a little bit here and there but it all works and its not hard to do and follow, THANK YOU!!!
Unfortunately Google changes their interface so frequently that it's impossible to keep up.
This is fantastic, thanks so much! ...Is there a way to include an image (any file format) in the data transfer? For a form I have images of a written signature included in the form questions, but when I put them in a column in the spreadsheet and run it though this program, in the resulting pdf it doesn't place the image but just prints the text "cellimage."
same question here!
Thanks
Thank You!
When you add more rows of data to your spreadsheet does the script re-create the pdfs already in the spreadsheet or just create new ones?
Duplicates the old ones, adds the new ones. Great question! I would like to know how NOT to create duplicates. I'm using this to create contracts. I suppose you could create the PDFs and then move the data to another sheet after completion. Seems unnecessary, though. Perhaps, setValues Done and use if...then? Or have it check the Done column first before creating the PDF?
@@cutlooseentertainment any updates please?
I really love ur channel
thank you very much for all your lessons, U R the best
one thing in this lesson :
When you Remove the temp file titeld "copy of template" from (Temp Folder) it goes to ROOT not to Trash
i've added this Function between the original two functions:
function trash() {
var files = DriveApp.getFilesByName("Copy of template");
while (files.hasNext())
files.next().setTrashed(true);
then added : trash();
in the end of the last function , after this line:
tempFolder.removeFile(tempFile);
It woorks fine
But , now we have to empty the trash manually
is their any wayTO EMPTY THE TRASH Automatically in the end of these scripts?
You have to use advanced Drive API service to be able to delete without clearing the trash. You can't do it with regular Apps Script DriveApp service, at least not at the moment.
Thanks for this modification! Accidentally found bunch of template files in ROOT folder and didn't manage to find where they came from. I modified this script by my needs a lot, so thought that some of mine script lines creates duplicates of template in ROOT folder. I had no idea that these copies come from temp folder. Your solution works great. Thanks :)
This worked like a hot pie! thank you, I love it
God bless you man. I think sometimes you read people's mind, this was a life savior video as it came out the right time we needed it to generate acceptance letters to email to students. Keep up the good work.
Awesome!
really love this channel now. feels like watching drama thriller series.
how did you make the second function run even so you picked the first function to run? what did you use to call the second function to the first function?
Can u explain how to use image stored as url in column to create pdfs? Example: I have signature stored in column K as google drive links and I want to fetch image from that url to create pdfs
hello, did you figure it how pls?
Nice project
¡Gracias!
Thank You!
Awesome! Thanks for posting the video. Informative and educative. You explained very well.
Glad you enjoyed it!
Explained everything very well. Nice work👍🏻👍🏻
Can we use sheets to populate user access accounts (with admin / general / guest permissions) to be used for people to log-in on a #GoogleSites webpage we may create?
Even though I don't fully understand what you need, I don't think it's possible at this moment.
If possible PDF File folder auto create into sharePoint ??
Awsome, one question i did include a code for automatic Send an Email bot i dont know how to get that created PDF as an Attachment into the Mail so i dont habe to resend all the Invoices again bot do it all at onec with one Click.
Absolutely amazing. Content, presentation, depth, to the point, spot on! Well done man!
Much appreciated!
how to make the pdfs merge automately? thanks
Hi, is it possible to open the pdf we have just created using script?
Hi, thanks for this knowledge . Could you tell me why I received this message ''data.forEach is not a function'' ?
Hi, I am getting the same error,
did you solve it?
Excellent tutorial. Question: since you use the script to create a new file and name it in drive, is there a way to create a link to the newly created file in a cell in the sheet?
I was looking for a way to do this as well.
Hey, your tutorials are amazing. Will you also please share the code which you write in the video.
I have seen your website but there is nothing available regarding this code. :(
Check @Richard Hain comment.
@@aka-alias function createBulkPDFs(){
const docFile = DriveApp.getFileById("id");
const tempFolder = DriveApp.getFolderById("id");
const pdfFolder = DriveApp.getFolderById("id");
const currentSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("people");
const data = currentSheet.getRange(2, 1,currentSheet.getLastRow()-1,4).getDisplayValues();
let errors = [];
data.forEach(row => {
try{
createPDF(row[0],row[1],row[3],row[0] + " " + row[1],docFile,tempFolder,pdfFolder);
errors.push([""]);
} catch(err){
errors.push(["Failed"]);
}
}); //close forEach
currentSheet.getRange(2, 5,currentSheet.getLastRow()-1,1).setValues(errors);
}
function createPDF(firstName,lastName,amount,pdfName,docFile,tempFolder,pdfFolder) {
const tempFile = docFile.makeCopy(tempFolder);
const tempDocFile = DocumentApp.openById(tempFile.getId());
const body = tempDocFile.getBody();
body.replaceText("{first}", firstName);
body.replaceText("{last}", lastName);
body.replaceText("{balance}", amount);
tempDocFile.saveAndClose();
const pdfContentBlob = tempFile.getAs(MimeType.PDF);
pdfFolder.createFile(pdfContentBlob).setName(pdfName);
tempFolder.removeFile(tempFile);
}
@@MAROCDL I apreciated that. Thank you so much.
"tempFolder.removeFile(newTempFile);" didn't really delete the file for me. It moved the file away from tempFolder then place it in My Drive instead of deleting it. I tried to comment the line out and run the script. Found that newTempFile still in tempFolder meaning it's created under the proper directory. Some how it's moved to My Drive when removeFile is executed. Weird! I ended up using this "DriveApp.getFileById(newTempFile.getId()).setTrashed(true);" and I cannot find the newTempFile anywhere anymore. Hope my finding can help someone!
Nice just 1 question.
Instead of using the button to run the code.
Can i run and create the pdf each time i fill out a google form which then populates the google sheets row? Also if it can be emailed to a specific email?
Hello, Can you tell me how to assign a script for button that should work for only single row. Please any one I need a prompt answer for my question.
this is a great tuturial - thank you. Is there a way of making a button to create a pdf for a specific row?
Would love to see a tutorial on printing out or exporting ranges to PDF or maybe image files, too. :) This would really be useful since there's currently no easy way to do this with code. Thank you so much for your great videos!
You know that this is useful and needed so, I am just gonna say thank you. It saved me days and it will save days to a lot of people.
You are a awesome teacher sir.
How should I do conditional printing of certain record based on particular column value
Do you know why my PDFs print with the values (i.e. {first})?
The only hint I have is that I noticed the google doc preview pane also shows the values (i.e. {first}, but when I open the doc, the correct values show. It takes a while, but the preview pane finally updates to show the correct values, but only after opening the doc manually and letting a few minutes pass by. Strange.
Update: I missed the () brackets after save and close.....works now!
This video has been so helpful! Thanks so much! I am trying to now get the URL of each created PDF to appear in the spreadsheet so that I can then send the link in an email. I have watched your other video that shows how to do this using data from a google form, but is there a simple set of code that can just be added to the code created in this video? Many thanks in advance.
this is great. what do i need to change if i want to make all rows of data into each page of one pdf file instead of make one file for each row?
This is the most useful channel for me
Love it very much
Thank you for creating this channel
Glad you enjoy it!
Hello, i wonder how to make it this PDF file per row? is there any modification on the script?
Firstly, amazing video thank you.
Secondly, if I wanted to add in script that whenever I click the 'Create PDFs' button in the spreadsheet, it only runs the script and creates PDFs based on new data that has been added to the spreadsheet and not old/already processed data, how would I go about doing that?
hello, did you figure out how?
@@JinaneKarhani Unfortunately I didn't. I have had to resort to just deleting the rows of data which I don't need to export.
@@nicka6782 Thank you, aha but this is not practical for some end users.
Hi, The app script works fine. Just a couple of issues. No1 . It creates a copy of the Template file in my Drive root directory. No 2. It times out after around 50 records, whereas I have the data for 900 records. Can you suggest a way to get around these issues ?
Thanks in advance
Hi, I hope you can still see this comment and can hopefully answer my question: Is it possible to edit the content of the textbox instead of the body? I'm trying to follow this but the text that I want to change is not located in the body but in a textbox.
If I would like to export pdf from google sheet (invoice template) but there are several invoice number which need to be manual select from drop down list. Do you have any idea to automate select invoice number and also automate export to pdf file ?
This was an AWESOME tutorial, just what I was looking for. I subscribed for the next tutorial.
Thank you so much for all your tutorials, I´ve learned a lot these years with them. I was wondering if this function will work for any user that the spreadsheet is shared with. I´ve tried different ways to get a google docs for the last row of a spreadsheet and so far, only I can use it; other users that have edit access to the sheet and shared the drive folder where the doc files are stored always get an error when trying to generate the doc. Do you have an idea of what I´m missing?
Is it possible also to insert IMAGE from cell or by link in cell of Spreadsheet?
This is SO SO SO helpful!
Kindly suggest automation for that PDF file link against that row with database.
Hi, many thanks for your teachings, very educative and over all step by step!
Thank you for this clear brief tutorial. How about if i have a URL in one of the field, what should I put instead of replacetext? If you can send us how, it would be very helpful, thank you.
Doesn't it just work if you treat it as text field?
@@ExcelGoogleSheets No sir, they need to click on it so it download the document..
@@joymawad9201 body.appendParagraph("link text here").setLinkUrl("www.google.com");
@@ExcelGoogleSheets I will try it thank you.
It worked perfectly, thank youuuu.
Is there a way for this to run only once per row of data so that when I have bulk data I don’t need to check which is already done and which is not
There is of course a way. :)
So no answer on this then huh? :(
@@klsidie right? that was kind of cryptic.
Is there a code that would autogenerate a new pdf everytime a new row is added? Also what is the link to the video to see how to send the pdf to email. Im looking to integrate this with some mobile ordering systems that use google sheets and every time a new order is created it creates a new row and then I would like it to create a pdf to then send it to email for a order printer in say resturant kitchen
A video like that should be published sometime this month.
@@ExcelGoogleSheets is it done sir?
What if I want not different PDF files but all in the same PDF file on different pages.
So @learngooglespreadsheets is there a way to email the newly created pdf as an attachment to those individuals (each row in the spreadsheet)?
Hi! I need help if this is possible, basically I copy this concept to create a PDF and i want to send it as well via email. my challenge is I need to put an if statement based on a specific column,. like if the specific column Z is blank then create a PDF. I hope you could help me.
What if I want to create a pdf for the rows which have true values in any column in the entire sheet..? Please help..
How would:
const data = currentSheet.getRange(2,1,currentSheet.getLastRow()-1,4).getDisplayValues();
be if I only wanted one pdf to be created out of the law row that has been added content into?
This would be useful because I would be generating only one pdf at a time not 3 at once.
Wow,,, super video,,, I going to practice. Thanks a Lot.
sir can we send doc file in mail to the users from temp folder to their ids without attachment if yes please share the function
I wonder if this would work if the placeholder words in the google docs is inside a table
how we can get just create a pdf for specifc rows that we want, kind of choice it first, or for a specific rule, maybe for the date. for exemplo, I have every day some new data, so today I want to generate some pdfs for data from yesterday... Thank you for videos, they are pretty awsome!
Any solution pls?
Hi! I am trying to put a signature (.jpg) that is on a Spreadsheet cell, into a google doc. Do you have any suggestions on how to do it? Many thanks!
Thanks for the informative video,it really helped me to get the automation i wanted to do from very long,i have no idea about java and any sort of scripting,but your explanation made it very easy to understand.big thanks
Hello, do you know why is my getAs PDF file still contains {First Name}, {Last Name}, and {Amount}, instead of the replaced one? I followed your steps, and tried to replace the tempFile with tempDocFile and it didn't work either. Thanks before!
i have the same problem. checked code twice and no errors in it.
How do I get a pdf from an especific row data? example: Let's say I want to get a pdf for Ana Brown only and I want to be able to get that pdf by changing somemthing like a dropdown that says "Create PDF"
Brilliant, thank you. Although a few of the functions/methods have been updated in 2024, this is still an awesome tutorial.
Really? What changed? I would think it all works the same.
Thanks for your effort done
the maximum pdf creating are 32 PDF from Spreadsheet , how can create 100 pdf for example ?
Hi! Amazing tutorial, do you have a related video where it automates the sending of the PDF files to emails of each person?
sorry sirs, if we used create pdf button again, wont it create duplicate file? if that's so then how can we prevent script from create duplicate file
Your explanations are awesome man. Is there any way to add an image to the PDFs before we email them?
Just doesnt work. When I start the bulk pdf part of the coding I run it and get these constant error messages. Its so frustrating!
createPDF @ Code.gs:16
(anonymous) @ Code.gs:10
createBulkPDFs @ Code.gs:9
with the exception of having more that 3 columns of data, I have followed along verbatim. Can anybody point me in the right direction??
Please 25:21
I love these videos I've learned so much! Could this be used to add a cell image to the pdf?
Thanks for all the content so far ! Im using extension to doing the same thing , which is whenever a google form submitted it will generate a pdf email. Wonder is this works by writing scripts from a newbie like me ? As the chrome app is not supported anymore end of this year...
Hi! How to get this script to add the generated PDF's URL to be placed on one of the columns as well?
Hi, hope you can help, this just what I been looking for, but I am getting a "TypeError: Cannot read property 'getRange' of null
createBulkPDFs @ Code.gs:8" and I can not work out why? cheers
You need to change the spreadsheet tab name from "Sheet 1" to "people".
@@AtlasAustralia cheers, I did eventually work it out, such a minor thing but fried my head lol
would it be possible to create pdf for a particular row in the spreadsheet.
Problem statement:
i have some 100 rows but i dont want to create pdf for all 100 rows but just for one one row. would it be possible to write a code in that manner.
also for each row i will have a checkbox, will i be able to generate a pdf as soon as the checkbox is ticked. would it be possible to write a code in that manner?
I am not able to change fields in bulk pdf nd not able to create pdf files too.what should I do word files are getting created but not able to create pdf nd change each row name in word file
Thank you , great tutorial.
Is it possible to open a PDF file right after its creation with Apps Script in Google Sheets?
In your previous videos you used to use var instead of let and const, why did you change it here? And I understand you try to use them as variables but what are you using 2 different things there?
Thank you for awesome contents!! Please keep up the great work!
Since JavaScript engine was recently updated we can now use "const" and "let" to declare variables. In this particular case you could just replace all of them with "var" and it would work just fine as well. "const" means it's constant, so it can not be changed to something else later in code, so it's not really a "variable", even though that's what I call it.
"let" is a long story :)
@@ExcelGoogleSheets IIRC from the olden days when computer processing speed was a concern, const executes faster. If my memory serves me right...
Hi! This has been such a huge help for me. Thank you for your amazing tutorials. We receive applications at my organisation using Google Forms. From there the data gets saved into a sheet and I want to then save PDF summaries of those applications. Your tutorial has allowed me to achieve this. The one thing I would love to be able to do in addition to this would be to now allow for duplicate files. The way the code works now, it creates PDFs for all rows each time the script is run. I'd love to be able to run the script and only create new PDFs for new application responses without creating more and more of the same. Do you have any advice on how I can find out how to do that?
Hello, I need to do this also
@@mayash7604 Hey, you would need to change the code that's getting all the rows to getting the last non-empty row. Then use the trigger tab to run the script every time a new row is added
@@nathanpolhemus1710 Can you show us how pls?
Very Useful Tutorial. Please Solve my issue to create pdf in Landscape from google spreadsheet (not google doc)
When I run my script, it is creating 4 extra pdf's for each 1 pdf with a name. Please help. Thanks.
Can you help with replacing the image with graphs ?