PDFs from Spreadsheet Data and Google Docs Template - Google Sheets

Поделиться
HTML-код
  • Опубликовано: 25 янв 2025

Комментарии • 637

  • @adamstrejcovsky8257
    @adamstrejcovsky8257 4 года назад +110

    I feel like I should pay for watching this. Outstanding quality.

    • @sportyguy1
      @sportyguy1 3 года назад +3

      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!

    • @helloscoopa
      @helloscoopa 3 года назад +5

      then donate on Patreon.

    • @MrJdorrington
      @MrJdorrington 2 года назад

      Shhh! He might hear.

    • @ankitashastri4101
      @ankitashastri4101 2 года назад

      just do it.. buy a thanks ..

  • @Rolroorlo
    @Rolroorlo 3 года назад +1

    You are the best Teacher for Google Apps Script with Spreadsheets

  • @ighsight
    @ighsight 4 года назад +3

    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.

  • @josephlynch4532
    @josephlynch4532 4 года назад +7

    My mind has just been blown. Thank you so much for the in-depth explanations. You have probably saved me months worth of work.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад +1

      Great to hear!

    • @openmindjustdoit1306
      @openmindjustdoit1306 3 года назад

      @@ExcelGoogleSheets
      Did you have Courses Online about app Script google sheet

    • @abnersangalang3849
      @abnersangalang3849 8 месяцев назад

      ​@@ExcelGoogleSheets hi, can i still use the removeFile method? cos it now says that this method is deprecated. thanks

  • @fernandobrito5316
    @fernandobrito5316 4 года назад +43

    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
      @ExcelGoogleSheets  4 года назад +4

      This might be a stupid question, but what does Google Contacts do?

    • @fernandobrito5316
      @fernandobrito5316 4 года назад +6

      @@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.

    • @Pilki
      @Pilki 4 года назад +3

      @@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!!

    • @mwKanj
      @mwKanj 4 года назад +4

      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.

    • @NetSkillNavigator
      @NetSkillNavigator 3 года назад

      So gay .. 🤣

  • @wagnerbarbosa1894
    @wagnerbarbosa1894 2 года назад

    This is Wagner, speaking from Brasil. Simply amazing your videos! Thank you for taking your time teaching us!

  • @adeep598
    @adeep598 4 года назад

    you are a saviour.. automated 70% of my department work from your channel

  • @tanveerhussain3881
    @tanveerhussain3881 3 года назад

    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

  • @vinaiv6969
    @vinaiv6969 4 года назад +3

    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?

  • @kyle943
    @kyle943 4 года назад +33

    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?

  • @zinalee2776
    @zinalee2776 4 года назад +7

    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!

  • @momiahealthcareandcorporat7357
    @momiahealthcareandcorporat7357 3 года назад +1

    4:05:35 PM Error
    TypeError: Cannot read property 'getRange' of null
    createBulkPDFs @ Code.gs:7
    I got this message when i run scipt

    • @AtlasAustralia
      @AtlasAustralia 3 года назад

      You need to change the spreadsheet tab name from "Sheet 1" to "people".

  • @jochembeumer2673
    @jochembeumer2673 3 года назад

    At 17:53 you explain that it's better to create a new object, is that done by creating a new function?

  • @DjEdu28
    @DjEdu28 3 года назад +6

    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.

  • @itamarnakar6698
    @itamarnakar6698 4 года назад +4

    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!

    • @ДмитрийПаравин
      @ДмитрийПаравин 4 года назад

      for me it creates PDF from initial template doc file, not from copy with replaced data. any ideas?

    • @itamarnakar6698
      @itamarnakar6698 4 года назад

      @@ДмитрийПаравин Sounds like you have a bug somewhere around binding data. follow the tutorial correctly step by step and you will succeed

    • @ДмитрийПаравин
      @ДмитрийПаравин 4 года назад

      @@itamarnakar6698 thanks for reply. i see that another user here have the same problem. may be something in google script was changed?

    • @JinaneKarhani
      @JinaneKarhani 2 года назад

      @@ДмитрийПаравин it s working like a charm in the new script

  • @janellewilson7655
    @janellewilson7655 Год назад

    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?

  • @DouglasThompson_Profile
    @DouglasThompson_Profile 3 года назад +2

    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.

    • @christianheins1530
      @christianheins1530 3 года назад

      have you had trouble on line 10
      const = tempfile = docFile.makeCopy(tempFolder);
      keeps returning docFile.maleCopy is not a function

  • @sarahleichnetz8198
    @sarahleichnetz8198 4 года назад

    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 :(

  • @ankitashastri4101
    @ankitashastri4101 2 года назад

    Thanks!

  • @eleazarcasaldo1312
    @eleazarcasaldo1312 Год назад

    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.

  • @RoyStevenUngKengSoon
    @RoyStevenUngKengSoon 4 года назад +1

    Great stuff! Everyone who uses Google Sheet/Excel should be on your channel!

  • @PriulaBasket
    @PriulaBasket 25 дней назад

    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

  • @First.Last.99
    @First.Last.99 3 года назад

    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!!!

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  3 года назад +1

      Unfortunately Google changes their interface so frequently that it's impossible to keep up.

  • @iffyswitch
    @iffyswitch 2 года назад +2

    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."

    • @MrTho99ed
      @MrTho99ed 2 года назад +1

      same question here!

  • @masharikraza7318
    @masharikraza7318 2 года назад

    Thanks

  • @agentleads5880
    @agentleads5880 3 года назад +2

    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?

    • @cutlooseentertainment
      @cutlooseentertainment 3 года назад +3

      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?

    • @JinaneKarhani
      @JinaneKarhani 2 года назад

      @@cutlooseentertainment any updates please?

  • @nilecentre9552
    @nilecentre9552 3 года назад +3

    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?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  3 года назад

      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.

    • @SauliusBaublys
      @SauliusBaublys 3 года назад +1

      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 :)

    • @First.Last.99
      @First.Last.99 3 года назад

      This worked like a hot pie! thank you, I love it

  • @mrzeidanmathclass
    @mrzeidanmathclass 4 года назад

    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.

  • @OneDeed90
    @OneDeed90 4 года назад +5

    really love this channel now. feels like watching drama thriller series.

  • @mohamed.montaser
    @mohamed.montaser 4 года назад +1

    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?

  • @kumarabhishek6998
    @kumarabhishek6998 4 года назад +2

    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

    • @JinaneKarhani
      @JinaneKarhani 2 года назад

      hello, did you figure it how pls?

  • @code-to-learn
    @code-to-learn День назад

    Nice project

  • @mateyjugo
    @mateyjugo 2 года назад

    ¡Gracias!

  • @raja2572
    @raja2572 4 года назад +2

    Awesome! Thanks for posting the video. Informative and educative. You explained very well.

  • @jiteshkharbanda5955
    @jiteshkharbanda5955 3 года назад +1

    Explained everything very well. Nice work👍🏻👍🏻

  • @TheRangeControl
    @TheRangeControl 4 года назад +2

    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?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад +1

      Even though I don't fully understand what you need, I don't think it's possible at this moment.

  • @alitamaster1314
    @alitamaster1314 2 года назад +1

    If possible PDF File folder auto create into sharePoint ??

  • @pkmsolutions7676
    @pkmsolutions7676 2 года назад

    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.

  • @elecsyslab3650
    @elecsyslab3650 3 года назад +1

    Absolutely amazing. Content, presentation, depth, to the point, spot on! Well done man!

  • @leosumantra7476
    @leosumantra7476 2 года назад +1

    how to make the pdfs merge automately? thanks

  • @akashmurarka3344
    @akashmurarka3344 4 года назад +1

    Hi, is it possible to open the pdf we have just created using script?

  • @Ydzioemre12
    @Ydzioemre12 4 года назад +3

    Hi, thanks for this knowledge . Could you tell me why I received this message ''data.forEach is not a function'' ?

    • @epicanime87
      @epicanime87 3 года назад

      Hi, I am getting the same error,
      did you solve it?

  • @cbsubs
    @cbsubs 4 года назад +4

    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?

    • @czarlieron271
      @czarlieron271 2 года назад

      I was looking for a way to do this as well.

  • @DroidRaxx
    @DroidRaxx 4 года назад +8

    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. :(

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад +2

      Check @Richard Hain comment.

    • @MAROCDL
      @MAROCDL 4 года назад +4

      @@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);

      }

    • @dayanecosta7652
      @dayanecosta7652 4 года назад

      @@MAROCDL I apreciated that. Thank you so much.

  • @ningbaby688
    @ningbaby688 Год назад +2

    "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!

  • @shannonconstructionheating4912
    @shannonconstructionheating4912 4 года назад +1

    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?

  • @nasirahmad4324
    @nasirahmad4324 3 года назад +1

    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.

  • @carolstanton8217
    @carolstanton8217 Год назад

    this is a great tuturial - thank you. Is there a way of making a button to create a pdf for a specific row?

  • @jedsantos9773
    @jedsantos9773 3 года назад +5

    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!

  • @yoanngrange
    @yoanngrange 3 года назад

    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.

  • @arijitroy3436
    @arijitroy3436 4 года назад +2

    You are a awesome teacher sir.

  • @gauravagrawal6944
    @gauravagrawal6944 3 года назад

    How should I do conditional printing of certain record based on particular column value

  • @alfredramirez8106
    @alfredramirez8106 3 года назад +1

    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.

    • @alfredramirez8106
      @alfredramirez8106 3 года назад

      Update: I missed the () brackets after save and close.....works now!

  • @rikkimace8321
    @rikkimace8321 2 года назад +1

    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.

  • @amusarung7828
    @amusarung7828 2 года назад

    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?

  • @bangdoeltips7492
    @bangdoeltips7492 3 года назад

    This is the most useful channel for me
    Love it very much
    Thank you for creating this channel

  • @mirfanalfian8313
    @mirfanalfian8313 2 года назад

    Hello, i wonder how to make it this PDF file per row? is there any modification on the script?

  • @nicka6782
    @nicka6782 3 года назад +2

    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?

    • @JinaneKarhani
      @JinaneKarhani 2 года назад

      hello, did you figure out how?

    • @nicka6782
      @nicka6782 2 года назад

      @@JinaneKarhani Unfortunately I didn't. I have had to resort to just deleting the rows of data which I don't need to export.

    • @JinaneKarhani
      @JinaneKarhani 2 года назад

      @@nicka6782 Thank you, aha but this is not practical for some end users.

  • @samirvora7972
    @samirvora7972 Год назад

    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

  • @EarlMolina-gl4kp
    @EarlMolina-gl4kp 2 года назад

    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.

  • @janeytaa
    @janeytaa 3 года назад

    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 ?

  • @ivanurbina2422
    @ivanurbina2422 2 года назад

    This was an AWESOME tutorial, just what I was looking for. I subscribed for the next tutorial.

  • @nanimal13
    @nanimal13 Год назад

    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?

  • @MykolaKryvetsky
    @MykolaKryvetsky 2 года назад

    Is it possible also to insert IMAGE from cell or by link in cell of Spreadsheet?

  • @jaydipjadia
    @jaydipjadia 2 года назад

    This is SO SO SO helpful!
    Kindly suggest automation for that PDF file link against that row with database.

  • @javiermgeco
    @javiermgeco 2 года назад

    Hi, many thanks for your teachings, very educative and over all step by step!

  • @joymawad9201
    @joymawad9201 2 года назад +1

    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.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 года назад

      Doesn't it just work if you treat it as text field?

    • @joymawad9201
      @joymawad9201 2 года назад

      @@ExcelGoogleSheets No sir, they need to click on it so it download the document..

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 года назад +1

      @@joymawad9201 body.appendParagraph("link text here").setLinkUrl("www.google.com");

    • @joymawad9201
      @joymawad9201 2 года назад

      @@ExcelGoogleSheets I will try it thank you.

    • @joymawad9201
      @joymawad9201 2 года назад

      It worked perfectly, thank youuuu.

  • @niranjan6725
    @niranjan6725 4 года назад +2

    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

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад +2

      There is of course a way. :)

    • @klsidie
      @klsidie 4 года назад

      So no answer on this then huh? :(

    • @TEEEEUM
      @TEEEEUM 3 года назад

      @@klsidie right? that was kind of cryptic.

  • @soloadios86
    @soloadios86 4 года назад +1

    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

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад +3

      A video like that should be published sometime this month.

    • @JinaneKarhani
      @JinaneKarhani 2 года назад

      @@ExcelGoogleSheets is it done sir?

  • @AnthonnyAG
    @AnthonnyAG 3 года назад +1

    What if I want not different PDF files but all in the same PDF file on different pages.

  • @jansusan3256
    @jansusan3256 4 года назад

    So @learngooglespreadsheets is there a way to email the newly created pdf as an attachment to those individuals (each row in the spreadsheet)?

  • @juanpauloalmazan2997
    @juanpauloalmazan2997 2 месяца назад

    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.

  • @Krishnadhurwey1986
    @Krishnadhurwey1986 Год назад

    What if I want to create a pdf for the rows which have true values in any column in the entire sheet..? Please help..

  • @marythr2617
    @marythr2617 3 года назад +1

    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.

  • @pedroivanmedinareyes8662
    @pedroivanmedinareyes8662 4 года назад +1

    Wow,,, super video,,, I going to practice. Thanks a Lot.

  • @samirmalhotra7974
    @samirmalhotra7974 2 года назад

    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

  • @pepemiko
    @pepemiko Год назад

    I wonder if this would work if the placeholder words in the google docs is inside a table

  • @fabriciosouza408
    @fabriciosouza408 4 года назад +3

    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!

  • @AndeanFace
    @AndeanFace Год назад

    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!

  • @MrBawa85
    @MrBawa85 4 года назад +3

    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

  • @sharon.marcellina
    @sharon.marcellina 4 года назад +1

    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!

  • @AndresAngelo
    @AndresAngelo 2 года назад

    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"

  • @lelapinblancvit
    @lelapinblancvit Месяц назад

    Brilliant, thank you. Although a few of the functions/methods have been updated in 2024, this is still an awesome tutorial.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Месяц назад

      Really? What changed? I would think it all works the same.

  • @gogomanish
    @gogomanish 4 года назад +1

    Thanks for your effort done
    the maximum pdf creating are 32 PDF from Spreadsheet , how can create 100 pdf for example ?

  • @almansorpendatun
    @almansorpendatun Год назад

    Hi! Amazing tutorial, do you have a related video where it automates the sending of the PDF files to emails of each person?

  • @pannawatnaubol5060
    @pannawatnaubol5060 3 года назад

    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

  • @dewaynewest7756
    @dewaynewest7756 4 года назад +3

    Your explanations are awesome man. Is there any way to add an image to the PDFs before we email them?

  • @ELLYSCHOOL-mx3wn
    @ELLYSCHOOL-mx3wn 4 месяца назад

    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

  • @ScottGriffin321
    @ScottGriffin321 Год назад

    I love these videos I've learned so much! Could this be used to add a cell image to the pdf?

  • @AhSharkk
    @AhSharkk 4 года назад +1

    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...

  • @octoberveramercado7994
    @octoberveramercado7994 4 года назад

    Hi! How to get this script to add the generated PDF's URL to be placed on one of the columns as well?

  • @huwparry7631
    @huwparry7631 3 года назад +1

    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

    • @AtlasAustralia
      @AtlasAustralia 3 года назад

      You need to change the spreadsheet tab name from "Sheet 1" to "people".

    • @huwparry7631
      @huwparry7631 3 года назад

      @@AtlasAustralia cheers, I did eventually work it out, such a minor thing but fried my head lol

  • @UFDPU
    @UFDPU 3 года назад

    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?

  • @vidhisakhidas261
    @vidhisakhidas261 4 года назад

    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

  • @mohamedazzouz9207
    @mohamedazzouz9207 3 года назад

    Thank you , great tutorial.
    Is it possible to open a PDF file right after its creation with Apps Script in Google Sheets?

  • @isikeratli
    @isikeratli 4 года назад +2

    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!

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад +6

      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 :)

    • @RoyStevenUngKengSoon
      @RoyStevenUngKengSoon 4 года назад

      @@ExcelGoogleSheets IIRC from the olden days when computer processing speed was a concern, const executes faster. If my memory serves me right...

  • @rikasterling4468
    @rikasterling4468 4 года назад +5

    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
      @mayash7604 3 года назад +1

      Hello, I need to do this also

    • @nathanpolhemus1710
      @nathanpolhemus1710 3 года назад +1

      @@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

    • @JinaneKarhani
      @JinaneKarhani 2 года назад

      @@nathanpolhemus1710 Can you show us how pls?

  • @shashikantprasad9186
    @shashikantprasad9186 2 года назад

    Very Useful Tutorial. Please Solve my issue to create pdf in Landscape from google spreadsheet (not google doc)

  • @lmooncleveland3344
    @lmooncleveland3344 4 года назад +1

    When I run my script, it is creating 4 extra pdf's for each 1 pdf with a name. Please help. Thanks.

  • @mahmoudafouna1592
    @mahmoudafouna1592 4 года назад +1

    Can you help with replacing the image with graphs ?