Thanks a lot!!! You've just saved tons of hours of my life! Moreover, everything is inspiring: the logic and style of explanation, air of the video, and your personal approach. Great job!
This worked great, how do I add day and year to the "current month" portion of the code, what is the proper code?. I will be automatically sending out a pdf weekly and do not want 4 files with the same name (ex "Oil Report June", I need "Oil Report June 7 2024" or similar. Thanks
Your video is awesome! I think app script has a potential to be an alternative of Salesforce applications. I know app script allows you to have a html website and users can interact with data. I wonder if it has another GUI approach that anyone who is not familiar with coding can handle data manipulation.
Thanks for your good video. I have been benefited by this one. Now please suggest me a code for delete the specific cells data of Google sheet by app script
If it doesn't work as expected you could maybe try to create the file with a different mimeType: developers.google.com/apps-script/reference/drive/drive-app#createfilename,-content,-mimetype
Hello, I tried this with a Google Sheet and it works. A slight issue though is that the PDF being saved/emailed includes all of the sheets within the file. If I only want to have a specific sheet sent and saved as a PDF, how should the script be tweaked? I hope you can still answer my question. Thank you in advance!
Hi thanks for your video, I have a question, do you think it is possible to export it as and not as a pdf? I have searched and tried other methods but it does not work, thanks for your comments and suggestions.
Check this tutorial to see how you could possibly only export one sheet: stackoverflow.com/questions/38335143/export-single-sheet-to-pdf-in-apps-script
Hello @Saperis, I hope you're going well. Please can you help us to make tutorial, on how we can convert to pdf each sheet into one SpreadSheet, or if you have some tips, you share them with us. thank you so much for your time and for what's you're doing. 🙌🏽
Thank you for your request. I don't do any Google Apps Script or Google Workspace videos anymore. Find out more in this video: ua-cam.com/video/OHd_xEabivg/v-deo.html
Thank you so much for this. I have one question...Instead of a month, I need a weekly report. How can I add that to the script? Thank you so much again. From Medellín, Colombia.
You would probably want to change the naming of the file to contain the week or the date. And then you would choose a weekly trigger instead of a monthly one.
Sure, you can do almost anything with Apps Script. Check the Apps Script documentation to find out how to achieve what you want to do: developers.google.com/apps-script/reference/spreadsheet
How would I go about for printing only one specific region of one specific sheet instead of the whole file? btw. Love how you do the presentation. Very professional.
Thanks for the feedback. 😀 Check this blog post to see how to export only a certain region. xfanatical.com/blog/print-google-sheet-as-pdf-using-apps-script/
@@saperis splendid thanks, exactly what I needed. But don't really understand the script on the page. Please can we get a video on this issue....thanks u d best
Thanks for the tutorial. How can I modify this to export as csv file? I tried simply changing all references from pdf to csv, but I get the error "Converting from application/vnd.google-apps.spreadsheet to application.csv is not supported." Thanks!
I'm not quite sure but I think CSV is not supported for what the script I wrote does. Check: ramblings.mcpher.com/gassnippets2/apps-script-file-conversions/ And also: github.com/prasmussen/gdrive/issues/303
Alright thank you for the reply@@saperis . One would think exporting as csv would be the easiest function from sheets. Apparently not. I'll work around it.
I am running a similar task of creating pdf but im using a template and replacing placeholders with row data of google sheet. Function is creating blob and attaching it to email but the attachment doesn't show anything but only one word "blob". Can you please help me how i can solve the issue.
Check this tutorial to see how you could possibly only export one sheet: stackoverflow.com/questions/38335143/export-single-sheet-to-pdf-in-apps-script
I don't think you can. The official documentation doesn't make any mention of passing in the paper format when creating a new file: developers.google.com/apps-script/reference/drive/folder#createfilename,-content,-mimetype
Amazing tutorial thank you so much. Can you please tell me how to convert and send a specific sheet name within the file, not the entire sheets? appreciated :)
Check this tutorial to see how you could possibly only export one sheet: stackoverflow.com/questions/38335143/export-single-sheet-to-pdf-in-apps-script
Great tutorial... sorry but I have to ask a question, I am getting a ReferenceError: Driveapp is not defined - any ideas? I tried scopes, etc... and nothing helps. Keep up the great work and thank you.
Great video! I wish to just export the rows having the current dates to the PDF every evening. How can I achieve that with your code mentioned here? Thanks
Hm. Not quite sure what the best option would be as it depends on your Sheets and your expectations. You would essentially be only copying data and so you would loose the spreadsheet layout. So it probably would be best to copy that new row into another Sheets and then export that one. But there might also be a more straight forward way of achieving your goal. Best you try it out.
Рік тому
Hi, thanks for this tutorial. Is there a method to force the pdf orientation to "landscape" ? A parameter to add or something else ?
This is very helpful! I would like to know though if it's possible to run this code so that (1) only a specific range is exported, and (2) change some PDF format options?
Hi! just watched your video tutorial. just wanna ask how can i extract certain data from google sheets, arrange it on google docs then send it via pdf? thank u
You would have to write a new script for that. Check the official documentation to find out how to use Apps Script to achieve your goals: developers.google.com/apps-script
You can only create a PDF from a spreadsheet and not from a single sheet within a spreadsheet. But after some research I think this might be the approach: - hide the other sheets within the spreadsheet - create your PDF of the spreadsheet (the hidden sheets are omitted) - un-hide the other sheets Here is where I read about this approach: stackoverflow.com/questions/38335143/export-single-sheet-to-pdf-in-apps-script
Check this tutorial to see how you could possibly only export one sheet: stackoverflow.com/questions/38335143/export-single-sheet-to-pdf-in-apps-script
Is there a way to do this with 100 different workbooks, first sheet only? and if there is, will it work if the top line is a merged cell? how to skip the top line if so. Thank you!
Well, those are some very specific questions. I've never done what you want to do but I, in theory, it should be possible. Obviously, you would have to adapt the script to your needs.
Thank you so much for this tutorial. I have countless usecases for that! May I ask one question: the .setName('Revenue Stats ${currentMonth}'); statement should define the file name. In your script, the ${currentMonth} command is black and refers to the const "currentMonth". Here on my side the string ${currentMonth} is red and is not referring to the setting behind, so the final pdf is named "Revenue Stats ${currentMonth}" and does not replace the place holder with the actual month. Same in the email subject. Do you have any advise on this? Thx in advance.
You can only create a PDF from a spreadsheet and not from a single sheet within a spreadsheet. But after some research I think this might be the approach: - hide the other sheets within the spreadsheet - create your PDF of the spreadsheet (the hidden sheets are omitted) - un-hide the other sheets Here is where I read about this approach: stackoverflow.com/questions/38335143/export-single-sheet-to-pdf-in-apps-script
I had the similar challenge. My total Google Spreadsheet has 10+ sheets in it. I only need to export 4 special sheets as pdf regularly (these 4 sheets contain the reporting dashboards). So here is the work around: Create a completely new Google Spreadsheet and use the "Importrange" formula to mirror/autosync the sheet from the original spreadsheet you need to export. As a result, this new spreadsheet only contains the sheet you need to export. You can do that with as much sheets as you might need for your regular export. Finally, use the spreadsheet-id of this new mirrored spreadsheet as the basis for the script you learned in this video. You do not have to touch this new "mirror spreadsheet" anymore. Whenever there is a change in your main spreadsheet, the "importrange" function will update everything automatically in the mirror spreadsheet. If you need help, how to use this magic "importrange" function, watch this video: ua-cam.com/video/5S7laJS9meU/v-deo.html hope that helps! I have built lots of automated regular reports based on these two hacks and it spends me a ton of time. crazy!
The error means that you are trying to run a function that isn't one. Check your code for any typos. Be aware that whenever you want to call a function you have to make sure to add the parentheses at the end: functioName()
Hello is there a google sheets native format ? Can we download it to local disk for backup to creat a an exact copy? There is only windows xlsx ods and PDF and some text files in file download menu.
No, you can't download any of the Google file formats directly to your computer. That's why in the menu you can only choose non-Google formats to download. But there are backup solutions out there. I remember seeing this video that might be helpful: ua-cam.com/video/UiZYy-146_0/v-deo.html
Please check your code again. Did you write all the necessary symbols? Any typos? The message is telling you that Pl.getAs is not a function. That could be because you didn't add the parentheses () or something similar.
I don't know as I've never had your exact situation. Maybe you could use the debugging mode to run your code to find out why it isn't working: ua-cam.com/video/L4V15ZxIjBQ/v-deo.html
Hallo I need your help I have lost of data in my spreadsheet and I want to make pdf a particular page with page set-up Please help me 🙏 Your video show whole spreadsheet data i want only a Particular page data to save as a pdf please help me
Maybe you could hide the sheets you don't want to have exported. Check this information to get an idea on how you could solve your problem: stackoverflow.com/questions/38335143/export-single-sheet-to-pdf-in-apps-script
Thanks a lot!!! You've just saved tons of hours of my life!
Moreover, everything is inspiring: the logic and style of explanation, air of the video, and your personal approach.
Great job!
Happy to hear the video was useful! Automation is all about being more efficient so I'm really happy this video has helped you to save time.
This worked great, how do I add day and year to the "current month" portion of the code, what is the proper code?. I will be automatically sending out a pdf weekly and do not want 4 files with the same name (ex "Oil Report June", I need "Oil Report June 7 2024" or similar. Thanks
Love your tutorials. How to export google sheet to pdf was just what I needed. Thank You. I am subscribed to your wonderful tutorial❤️
Awesome, thank you! 😀
Your video is awesome! I think app script has a potential to be an alternative of Salesforce applications.
I know app script allows you to have a html website and users can interact with data. I wonder if it has another GUI approach that anyone who is not familiar with coding can handle data manipulation.
Thanks for watching. Yes, you could have people add their data to a website if they might be intimidated by a spreadsheet.
Thanks for your good video. I have been benefited by this one.
Now please suggest me a code for delete the specific cells data of Google sheet by app script
suwun ya mbak....
Is there a way I can time this export to be done once a week?
Mam, I want to export only particular tab as pdf . How I would do that using app script?????
Please help!!!
Check the comments on this video. I've re-shared a tutorial to do so multiple times.
it is very good code thanks to lot but one things when i write it is export this file in mobile but always ask to open with which format
If it doesn't work as expected you could maybe try to create the file with a different mimeType: developers.google.com/apps-script/reference/drive/drive-app#createfilename,-content,-mimetype
this is so new for me this GAS programming, a newbie :D excellent vid!
Welcome to the GAS community! Happy you liked the video.
Superb ma’am Thank you so much
Welcome 😊
Hello, I tried this with a Google Sheet and it works. A slight issue though is that the PDF being saved/emailed includes all of the sheets within the file. If I only want to have a specific sheet sent and saved as a PDF, how should the script be tweaked? I hope you can still answer my question. Thank you in advance!
Have a look at this blog post: xfanatical.com/blog/print-google-sheet-as-pdf-using-apps-script/
Excellent and useful Chanel! Perhaps you can add ko-fi as a way to sustain and grow your YT.
Thanks for the tip! 😀
Hi thanks for your video, I have a question, do you think it is possible to export it as and not as a pdf? I have searched and tried other methods but it does not work, thanks for your comments and suggestions.
As what type of file do you want to export it?
Thanks for your video. If there are many sheets in the file. How could I export one specific sheet to pdf?
Check out this blog post to see how it's done: xfanatical.com/blog/print-google-sheet-as-pdf-using-apps-script/
Thanks for the really good lecture :) I have one question, is it possible to extract only one specific sheet from google spread sheet file?
Check this tutorial to see how you could possibly only export one sheet: stackoverflow.com/questions/38335143/export-single-sheet-to-pdf-in-apps-script
Thank you sister
Welcome
Hello @Saperis, I hope you're going well. Please can you help us to make tutorial, on how we can convert to pdf each sheet into one SpreadSheet, or if you have some tips, you share them with us.
thank you so much for your time and for what's you're doing. 🙌🏽
Thank you for your request. I don't do any Google Apps Script or Google Workspace videos anymore. Find out more in this video: ua-cam.com/video/OHd_xEabivg/v-deo.html
@@saperis Thank you so much.
Thank you so much for this. I have one question...Instead of a month, I need a weekly report. How can I add that to the script? Thank you so much again. From Medellín, Colombia.
You would probably want to change the naming of the file to contain the week or the date.
And then you would choose a weekly trigger instead of a monthly one.
Thank you, I got a question. There is any way I can export the PDF when I click a button and don't send the email, just open the PDF
Sure, you can do almost anything with Apps Script.
Check the Apps Script documentation to find out how to achieve what you want to do: developers.google.com/apps-script/reference/spreadsheet
How would I go about for printing only one specific region of one specific sheet instead of the whole file?
btw. Love how you do the presentation. Very professional.
Thanks for the feedback. 😀
Check this blog post to see how to export only a certain region.
xfanatical.com/blog/print-google-sheet-as-pdf-using-apps-script/
@@saperis splendid thanks, exactly what I needed. But don't really understand the script on the page. Please can we get a video on this issue....thanks u d best
@@oluwayomidada3536 Very sorry, but I don't do any Apps Script videos anymore.
Thanks for the tutorial. How can I modify this to export as csv file? I tried simply changing all references from pdf to csv, but I get the error "Converting from application/vnd.google-apps.spreadsheet to application.csv is not supported." Thanks!
I'm not quite sure but I think CSV is not supported for what the script I wrote does.
Check: ramblings.mcpher.com/gassnippets2/apps-script-file-conversions/
And also: github.com/prasmussen/gdrive/issues/303
Alright thank you for the reply@@saperis . One would think exporting as csv would be the easiest function from sheets. Apparently not. I'll work around it.
Thank you! So helpful. how do I name the PDF based on a cell value?
For example: .set name (‘File Name - grabs cell value A1’);
Thanks so much!
You would have to modify the script to get a value out of a certain cell and then using that as the name of the document.
I am running a similar task of creating pdf but im using a template and replacing placeholders with row data of google sheet. Function is creating blob and attaching it to email but the attachment doesn't show anything but only one word "blob". Can you please help me how i can solve the issue.
I'm guessing there is an error in our script. Try to find it by following this video: ua-cam.com/video/L4V15ZxIjBQ/v-deo.html
Good
Thanks 😀
Hi, this is just what I needed, Would it be possible to just send one of the sheets PDF instead workbook?
Check this tutorial to see how you could possibly only export one sheet: stackoverflow.com/questions/38335143/export-single-sheet-to-pdf-in-apps-script
@@saperis Thanks a lot
Is there a way to customize this to export in landscape format? Thank you for the great video!
I don't think you can. The official documentation doesn't make any mention of passing in the paper format when creating a new file: developers.google.com/apps-script/reference/drive/folder#createfilename,-content,-mimetype
Amazing tutorial thank you so much. Can you please tell me how to convert and send a specific sheet name within the file, not the entire sheets? appreciated :)
Check this tutorial to see how you could possibly only export one sheet: stackoverflow.com/questions/38335143/export-single-sheet-to-pdf-in-apps-script
@@saperis Thank you so much.
Great tutorial... sorry but I have to ask a question, I am getting a ReferenceError: Driveapp is not defined - any ideas? I tried scopes, etc... and nothing helps. Keep up the great work and thank you.
The error message tells you that you are using "Driveapp" but that doesn't exist.
Note how I wrote "DriveApp" in my script. It has to be a capital A.
Great video!
I wish to just export the rows having the current dates to the PDF every evening. How can I achieve that with your code mentioned here?
Thanks
Hm. Not quite sure what the best option would be as it depends on your Sheets and your expectations.
You would essentially be only copying data and so you would loose the spreadsheet layout. So it probably would be best to copy that new row into another Sheets and then export that one.
But there might also be a more straight forward way of achieving your goal. Best you try it out.
Hi, thanks for this tutorial. Is there a method to force the pdf orientation to "landscape" ? A parameter to add or something else ?
Not that I know of
This is very helpful! I would like to know though if it's possible to run this code so that (1) only a specific range is exported, and (2) change some PDF format options?
Check this blog post as it seems it's more what you are looking for than my video.
xfanatical.com/blog/print-google-sheet-as-pdf-using-apps-script/
@@saperis Thank you for the link!
Hi! just watched your video tutorial. just wanna ask how can i extract certain data from google sheets, arrange it on google docs then send it via pdf? thank u
You would have to write a new script for that. Check the official documentation to find out how to use Apps Script to achieve your goals: developers.google.com/apps-script
Great video 👍👍👍
Glad you enjoyed it 😀
Hi bro! If I only would like to export 1 sheet in the spreadsheet, How could I do? Thanks
Check out this blog post to see how it's done: xfanatical.com/blog/print-google-sheet-as-pdf-using-apps-script/
This is fantastic! Are you able to please provide a link to - or the actual copy/paste script? Sorry if it's obvious and I just missed it.
Thanks for watching. We don't share the code of the scripts directly. You get the script by copying as we write the code.
Pls help , how can I select just only one sheet that I am working on it and how can I customize the pdf file like A4 , lanscape ?
Check the comments as this has been asked many times and I always share a link to a tutorial you will want to check out.
Hello, me again. Can I get the email from another cell value? I mean, the email will change everytime.
Sure. You are the creator of the script. So you decide how it works.
Hi, your video help me. Can I ask on how to automatically set it into landscape when converting into pdf?
I don't know how to change the page orientation either.
@@saperis Oh I see, thanks for your response! Looking forward for more tutorial
Sempre brava!
Grazie 😀😀
@@saperis ma sai anche l'italiano?🤩
@Andrea Guerri Si, un po.
i need to export only one sheet in a multi sheet document, how can i do ?
You can only create a PDF from a spreadsheet and not from a single sheet within a spreadsheet.
But after some research I think this might be the approach:
- hide the other sheets within the spreadsheet
- create your PDF of the spreadsheet (the hidden sheets are omitted)
- un-hide the other sheets
Here is where I read about this approach: stackoverflow.com/questions/38335143/export-single-sheet-to-pdf-in-apps-script
😀What if we have 40 recipients?
Very good. There is a way to save only some sheets from a file?
Check this tutorial to see how you could possibly only export one sheet: stackoverflow.com/questions/38335143/export-single-sheet-to-pdf-in-apps-script
@@saperis Thanks a lot
Is there a way to do this with 100 different workbooks, first sheet only? and if there is, will it work if the top line is a merged cell? how to skip the top line if so. Thank you!
Well, those are some very specific questions. I've never done what you want to do but I, in theory, it should be possible. Obviously, you would have to adapt the script to your needs.
@@saperis Yes, I'm looking to see what that script is. But this got me off to the right start. Thank you!
Thank you so much for this tutorial. I have countless usecases for that! May I ask one question: the .setName('Revenue Stats ${currentMonth}'); statement should define the file name. In your script, the ${currentMonth} command is black and refers to the const "currentMonth". Here on my side the string ${currentMonth} is red and is not referring to the setting behind, so the final pdf is named "Revenue Stats ${currentMonth}" and does not replace the place holder with the actual month. Same in the email subject. Do you have any advise on this? Thx in advance.
Oh, so easy. I am posting the solution here. For setting the name use ` instead of '. ;-)
Yes. You need to use backticks and not common ticks. Looks almost the same but has a very different outcome.
hi good day,,, how to make a print button and preview using spreadsheet ,, thanks
Check this video to find out how you can add such a button: ua-cam.com/video/Xd56y8GZbIM/v-deo.html
Thank you so much.
Please guide how can we send single sheet from workbook.
You can only create a PDF from a spreadsheet and not from a single sheet within a spreadsheet.
But after some research I think this might be the approach:
- hide the other sheets within the spreadsheet
- create your PDF of the spreadsheet (the hidden sheets are omitted)
- un-hide the other sheets
Here is where I read about this approach: stackoverflow.com/questions/38335143/export-single-sheet-to-pdf-in-apps-script
@@saperis Thank you for your support.
I had the similar challenge. My total Google Spreadsheet has 10+ sheets in it. I only need to export 4 special sheets as pdf regularly (these 4 sheets contain the reporting dashboards). So here is the work around: Create a completely new Google Spreadsheet and use the "Importrange" formula to mirror/autosync the sheet from the original spreadsheet you need to export. As a result, this new spreadsheet only contains the sheet you need to export. You can do that with as much sheets as you might need for your regular export. Finally, use the spreadsheet-id of this new mirrored spreadsheet as the basis for the script you learned in this video. You do not have to touch this new "mirror spreadsheet" anymore. Whenever there is a change in your main spreadsheet, the "importrange" function will update everything automatically in the mirror spreadsheet. If you need help, how to use this magic "importrange" function, watch this video: ua-cam.com/video/5S7laJS9meU/v-deo.html
hope that helps! I have built lots of automated regular reports based on these two hacks and it spends me a ton of time. crazy!
@@sirhenrymondeo Yes this how we are doing !!
Hello, im getting this error: TypeError: reveneuStats.getAs is not a function, any idea how solve it?
The error means that you are trying to run a function that isn't one. Check your code for any typos. Be aware that whenever you want to call a function you have to make sure to add the parentheses at the end: functioName()
How to send Excel like this
Check this tutorial: spreadsheet.dev/comprehensive-guide-export-google-sheets-to-pdf-excel-csv-apps-script
Hello is there a google sheets native format ? Can we download it to local disk for backup to creat a an exact copy? There is only windows xlsx ods and PDF and some text files in file download menu.
No, you can't download any of the Google file formats directly to your computer. That's why in the menu you can only choose non-Google formats to download.
But there are backup solutions out there. I remember seeing this video that might be helpful: ua-cam.com/video/UiZYy-146_0/v-deo.html
how to choose some row and collum
Check the documentation to find out: developers.google.com/apps-script/reference/spreadsheet/sheet
Thanks for the video. But I am getting following error - "TypeError: PI.getAs is not a function".
Please check your code again. Did you write all the necessary symbols? Any typos?
The message is telling you that Pl.getAs is not a function. That could be because you didn't add the parentheses () or something similar.
one question, i make that script for my spreadsheet that contain images in merged cell and the script isn't working. how do i solve this ?
I don't know as I've never had your exact situation.
Maybe you could use the debugging mode to run your code to find out why it isn't working: ua-cam.com/video/L4V15ZxIjBQ/v-deo.html
I want to convert Pdf in Landscape
I'd check Stackoverflow to see if you can find a code snippet there. I don't have one at hand myself.
The following error message is seen.
DriveApp is not defined
Could you please guide me here?
Check your code again because you somehow aren't referencing the DriveApp correctly.
Is there maybe a typo in your code?
How to share only a worksheet's range and not the whole google sheet as a pdf?
We have no video about how to do that. Maybe this article can help you: stackoverflow.com/questions/38335143/export-single-sheet-to-pdf-in-apps-script
How to export as image
How do I convert from multiple sheets?
If I'm not mistaking this script makes a PDF from a spreadsheet. So from the entire file including all the sheets within the file.
How can you send just one worksheet of a workbook?
Have a look at this tutorial: xfanatical.com/blog/print-google-sheet-as-pdf-using-apps-script/
Mam if I need next month then what to do
I guess you export it next month?
@@saperis I want to do it for salary slip
hello mam pls reply
Hallo
I need your help
I have lost of data in my spreadsheet and
I want to make pdf a particular page with page set-up
Please help me 🙏
Your video show whole spreadsheet data i want only a
Particular page data to save as a pdf please help me
Maybe you could hide the sheets you don't want to have exported.
Check this information to get an idea on how you could solve your problem: stackoverflow.com/questions/38335143/export-single-sheet-to-pdf-in-apps-script
Ohh 😂
Thanks a lot.
🙏
I this method page will not setup
How to setup page like A3 ,A4 and
Make pdf a particular sheet
Can you help me please
🙏
do you use Facebook? I need you support
Hey Anh. We don't offer any support for Google Apps Script projects or automations.
How can I print 2 pages?
You can't print with Apps Script as it doesn't have a way to connect to your computer or printer.
@@saperis I mean how do I export to pdf but from specified sheet and want 2 pages