Google Sheets UserForm - Send Data from Form to Spreadsheet

Sdílet
Vložit
  • čas přidán 29. 08. 2024
  • Learn how to connect the userform to Google Sheets spreadsheet and use Bootstrap as a user interface.
    This tutorial is Part 2 from Google Sheets Userform - Level 2 series
    • Google Sheets Userform...
    #userform #googlesheets #bootstrap

Komentáře • 161

  • @kpriyanthrachamadugu5537
    @kpriyanthrachamadugu5537 Před 4 lety +4

    Thank you, Thank you, Thank you. I am waiting for more videos of this series. I am sure, this shall add immense value for sheets in my organization. Thank you

  • @josedejesusfragozolopez6396

    Estoy aprendiendo con mucha dificultad por el tema y el idioma.... Estos videos son de mucho valor para mi. Gracias por subirlos.

  • @thatmose
    @thatmose Před 4 lety +6

    Thanks for the content. Clear and for some reason it always drops in when that is the exact problem I might be having.

  • @srider33
    @srider33 Před 4 lety +1

    Friendly tip: using hyphenated variables prevents double-clicking on entire variable name. I prefer underscore (so item_name instead of item-name). Great series.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 4 lety +2

      It's hard to break old habits :)

    • @srider33
      @srider33 Před 4 lety +1

      @@ExcelGoogleSheets oh I know. I still sometimes catch myself typing DIM instead of VAR 🤦🏻‍♂️.

  • @pichpituseng5096
    @pichpituseng5096 Před 4 lety +1

    Your video tutorial is very helpful and clearly explaination.

  • @kristinerojas8798
    @kristinerojas8798 Před 4 lety +1

    Great!!! Can't wait for the other videos. . .

  • @hilmanhannan2892
    @hilmanhannan2892 Před 4 lety +1

    Great n usefull content...

  • @salajsmartech5434
    @salajsmartech5434 Před 3 lety +5

    I did everything the same way but button click is not working. Also the html code from had some changes in the script part. I don't know why it is not working, can you help?

    • @hendrikpieper3625
      @hendrikpieper3625 Před 2 lety

      I got the same Problem, did you found a way to solve this Problem?

  • @michaelknichel4443
    @michaelknichel4443 Před 4 lety +3

    Biting my nails waiting for the rest of the series.

  • @lagimegabekasi
    @lagimegabekasi Před 4 lety +1

    Cant wait for this...Amazing...

  • @ld2711
    @ld2711 Před 3 lety +1

    Terrific! Thanks so much !

  • @arielzabatecuizon5147
    @arielzabatecuizon5147 Před 3 lety +1

    More power!! keep it up!!

  • @mohanapriya4372
    @mohanapriya4372 Před 2 lety +1

    you are the man..

  • @munish2839
    @munish2839 Před 4 lety

    Thanks bro, well explained and clarified, awaiting for rest of the topics.

  • @pomysuartawa
    @pomysuartawa Před 4 lety +1

    Thanks bro, need this content more

  • @ragnarok7976
    @ragnarok7976 Před 3 lety

    I'll have to double check but I think the AppScript editor has a lot of the same key binds as VS Code. You should be able to alt + shift + F to format the entire document, indentation and all!

  • @findthetruth3021
    @findthetruth3021 Před 4 lety

    It is really amazing, but if we want to make an interface form then we need to have reset, delete, search, update...etc as well as sometimes we may need to have drop-down list in the interface form. I really love ur videos and if you can make these things that would be awesome. Thanks in advance.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 4 lety

      I believe all of that is covered in Userform Level 2 and Userform Level 3 series that are being edited and uploaded now.

    • @findthetruth3021
      @findthetruth3021 Před 4 lety

      @@ExcelGoogleSheets you are awesome bro thnx a lot

  • @Rayxchui716
    @Rayxchui716 Před 4 lety +1

    Awesome content.

  • @waltone87
    @waltone87 Před 3 lety +2

    I am not able to get the button to work. Has there been update since this video was recorded that changed how we would run this code successfully?

  • @PepitoGrilloCanarias
    @PepitoGrilloCanarias Před 4 lety +1

    Amazing! Thanks

  • @nicksonbonke2608
    @nicksonbonke2608 Před 4 lety +1

    Thanks. Good video. Please show how we can update data we have send to the Google sheet via the user form. Thanks

  • @findthetruth3021
    @findthetruth3021 Před 4 lety +3

    How to add a unique number automatically in the first column for each row like the automated date you created? please

  • @gannsebastianquiban5060
    @gannsebastianquiban5060 Před 4 lety +6

    I did everything, but my data entered cannot enter the spreadsheet. I need help!

  • @shinrafahell
    @shinrafahell Před 3 lety

    Excellent tutorial thanks.

  • @bratuadrian1436
    @bratuadrian1436 Před 4 lety +1

    thank you

  • @govugowrishanker4107
    @govugowrishanker4107 Před 3 lety +3

    TypeError: Cannot read property 'item' of undefined
    This error is finding at the end
    Please let me know how can i solve it

    • @ludovicab8804
      @ludovicab8804 Před 3 lety

      have the same.. mine it works only with the first example, by specifying the value of the constants. otherwide the last method gives me 'undefined item'

  • @bogdanszczepanski5911
    @bogdanszczepanski5911 Před 3 lety

    Thank you, it's very good series. However I have not any idea how to create email with clickable button and function which can modify value in spreadsheet.

  • @maurofuzetto9141
    @maurofuzetto9141 Před 4 lety +2

    Você é o cara, man! =D

  • @a2414205
    @a2414205 Před 4 lety +1

    that is great but i want to know more about how to make modify & delete button working as well

  • @gabrielepigani9405
    @gabrielepigani9405 Před 2 lety

    Hi, wonderful tutorial explained very well, congratulations!!!
    About showModalDialog or showSidebar I have a question that I can’t solve: how suspend the server-side script while the showModalDialog or showSidebar is open?
    Basically I would like the script resumes after the user dismisses the dialog.
    Sorry for my bad English I hope I made myself clear.
    Thanks bye
    Gabriele

  • @nunomarques6106
    @nunomarques6106 Před rokem

    Hi. I want to add a droplist like this on a hmtl form and send results to another google sheet. Can i use this method? This example save in the same sheet. Thank you for all the assistance.

  • @kennethforbin5604
    @kennethforbin5604 Před 3 lety

    Danke sehr, Merci beaucoup, Thank you. Lord this is fascinating

  • @ludovicab8804
    @ludovicab8804 Před 3 lety +1

    Dear all, I tried to reproduce the program, but at the point in which I have to write the addrow function and the button function nothing happens. I checked the dubugs, I inspected and I have some warnings.
    Here is thaty part of the code. I attach some warnings as well. the id of the button is defined and correct.
    const ss = SpreadsheetApp.getActiveSpreadsheet();
    const ws = ss.getSheetByName("Results");

    function bottonadd(){

    var itemName = document.getElementById("item-name");
    var top = document.getElementById("topic");
    const aa = itemName.value;
    const bb = top.value;
    const currentDate = new Date();

    ws.appendRow([aa,bb,currentDate]);

    }
    document.getElementById("main").addEventListener("click",bottonadd);
    debuggs:
    - Uncaught ReferenceError: SpreadsheetApp is not defined at userCodeAppPanel:2
    - Failed to load resource: net::ERR_QUIC_PROTOCOL_ERROR.QUIC_PACKET_WRITE_ERROR
    Someone had the same problem and solved?
    Please help me. I surrend :(
    Thank you

  • @anasselamrani1090
    @anasselamrani1090 Před 4 lety

    Thank u for those wonderfull tuto

  • @natanaeldeoliveira4399

    Hello!.
    Is it possible to upload an image in the form?.
    Thanks so much!!.

  • @SiriusZcs
    @SiriusZcs Před 4 lety

    Good job,
    I have a special question and I am not sure which of your video is the right one:
    I want to create a chart and I have different sheets for January, February (...)
    Every sheet has the same layout and in the Final sheet I want to get all the data from there but I don't want to copy all of them. Is it possible to use a formula to change just the sheet name?
    e.g.
    January!A2
    January!A3
    and then I need for every other sheet the same
    February!A2
    February!A3
    (...)
    I didn't find a solution yet to change sheet reference in the formula. Thank you in advance!

  • @keishaaniria
    @keishaaniria Před 3 lety

    Thanks for this amazing video. I did and it works. But when I create with many data in column and i have followed step by step as seen in video, the data cannot add from form to spreadsheet. Please help me.

  • @peraruor
    @peraruor Před 10 měsíci

    Sorry, but again, when search for "Starter template" in getbootstrap, a different example show up with what appear to be arabic characters. Any advice? Thanks

  • @developmentbajatoparts8171

    google.script.run.doSomething(values) is not working with sidebar I am using new code editor. Showing type unknown and status failed in executions. Please Suggest something....

  • @Vivek-np9vm
    @Vivek-np9vm Před 4 lety +1

    TypeError: Cannot Read properly appendRow off null error message received. Please help

  • @KhanterWinters
    @KhanterWinters Před 3 lety

    one year after. But is there a way to create a load of info to be able to save it as directory? so from a google form we collect name, email, phone. and get the data to paste into a directory.

  • @emmasafran6817
    @emmasafran6817 Před 4 lety

    Very helpful serie ! Thanks again
    I come back to this video because i need to add an "radio" input to the form but there is a different ID for each option so i don't know how to process this with the JS
    Would be gratefull if someone can help !

  • @markbrantana9293
    @markbrantana9293 Před 2 lety +1

    It would be more helpful if you provided the code in a copyable form.

  • @Mr7Doug
    @Mr7Doug Před 3 lety +3

    The video was awesome! It worked while using hard codes. But when procedure for get form data it stops working. Debug returned: "Cannot read property 'item' of undefined
    addNewRow @ funcs.gs:5" - I checked every character and evereything seems to be exaclty like shown in the video. If someone have a hint I would appreciate. Thank´s.

    • @developmentbajatoparts8171
      @developmentbajatoparts8171 Před 3 lety +3

      I thing we both are facing same issue. Showing function type unknown and status failed in executions.

    • @OswinTan
      @OswinTan Před 3 lety +1

      i'm facing the same issue as well. hopefully someone can help on this.

    • @vineetchauhan7072
      @vineetchauhan7072 Před 3 lety

      @@OswinTan Log into your browser with same email which you are using to make user form. You need to log in with same account into chrome(if you are using)and Gmail. 👍👍

  • @clairmontmiller6582
    @clairmontmiller6582 Před 4 lety +1

    Hey, thanks so much for this content, its super helpful. I am having some trouble though. I copied everything exactly as in the video, and re-did it again. Everything works up till the button click. But, I cant get the click to run the script.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 4 lety +1

      Please watch this
      czcams.com/video/flxj-QB50zo/video.html

    • @clairmontmiller6582
      @clairmontmiller6582 Před 4 lety +1

      @@ExcelGoogleSheets Thanks so much, that video was also incredibly helpful. I found it was an authorization issue. After authorizing it in my default google account, its working perfectly.

    • @albertoivanmoralessanchez7984
      @albertoivanmoralessanchez7984 Před 4 lety

      @@clairmontmiller6582 Que tal, exactamente en donde distes las autorizaciones, yo aun no logro que corra y esta todo correcto.

    • @everettdavis3219
      @everettdavis3219 Před 4 lety

      I watched the video and used the console. The form works as a standalone web app but not as a side panel. It says that access is denied.

    • @ludovicab8804
      @ludovicab8804 Před 3 lety

      @@clairmontmiller6582 Can you please tell me how to get the missing authorization?
      Thanks

  • @truog91
    @truog91 Před 4 lety

    how to correct indentation ? did you use shift+ tab ?

  • @deepakmishra-qz8jh
    @deepakmishra-qz8jh Před 4 lety

    Hi whatever you did its goes well for me but what i want here to do is i want to run this code in every sheet of the workbook in same range so can you help me please to modify the code

  • @gogolinda7299
    @gogolinda7299 Před 3 lety

    You are a god :)

  • @ddifferent21
    @ddifferent21 Před 3 lety

    Can you please tell, which video playlist to see first, to understand the code ?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 3 lety

      czcams.com/video/PsIuSwSj3CM/video.html
      Then czcams.com/play/PLv9Pf9aNgemuzTNWeHd8HziGVNzSlWACh.html

  • @christiannorgard3260
    @christiannorgard3260 Před 2 lety

    Gréât video. How would one go about having a sidebar entry form in which you could add lines of items before possibly validating the form . I have a spreadsheet for sales, with one sale having potentially several items (not more than 5) : the form would basically need date and sale number as fixed fiels and then have one or more items that would each be sent onto a separate line of the « saleitems » sheet?

  • @littleclover2334
    @littleclover2334 Před 3 lety

    Good day sir! I have a question sir. What if i wanted this form to automticatically open when i open the google sheet file would it be possible? I tried it by not puting the createMenu & onOpen function but it didn't work. What should i do? Thanks in advance

  • @reymariebatulan4201
    @reymariebatulan4201 Před rokem

    why theres error? TypeError: Cannot read properties of undefined (reading 'item')

  • @Techhiedoc
    @Techhiedoc Před 4 lety

    Hi, Great content. Thanks for this. How can I have access to rest of the 3 videos in the series?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 4 lety

      The videos are being edited and uploaded now. It will take some time until all of them are available.

  • @citiesinspace4864
    @citiesinspace4864 Před 4 lety

    Is there any way to limit the userform to a particular tab? Or at least make the userform sidebar much larger? My idea was to limit the userform to the first tab in a workbook, where all you can see is the userform.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 4 lety

      You can load it as a dialog box, but you can't limit it to a particular tab. It's either open or closed.

  • @niranjan6725
    @niranjan6725 Před 4 lety

    Could you also show how to reset the forms after clicking add.....so that they Form is empty after clicking it

  • @marvincaok831
    @marvincaok831 Před 2 lety

    i follow all scripts and code, why i cant insert data in the databae, pls help

  • @duyryan7073
    @duyryan7073 Před 3 lety

    Can I add two item? Replace qty by item 2?

  • @muhammadafiqzakwanbinazidi5069

    First of all, thank you for the tutorials! really helpful however i have a question.
    1.My data is inserted just fine however, when i added arrayformula in the sheet itself , it kinda fucked up the whole sheet and i cant insert data into rows anymore. How do i fix this?
    Basically what im tryna achieve is when i input data into the sheet, the data will be calculated in a different collumn, so everytime i input data, it will automatically calculate the data i input into new rows. Thank you

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 4 lety

      Easy way around this is to use a copy sheet, I have an example here czcams.com/video/0v-hQ3EecdE/video.html
      You can also use array formulas that don't overflow the range.

    • @muhammadafiqzakwanbinazidi5069
      @muhammadafiqzakwanbinazidi5069 Před 4 lety

      @@ExcelGoogleSheets Thank you kind sir,
      Although the first solution sounds interesting, i feel like using the second since it fits my project more.
      Therefore, how can i use the array formulas that dont overflow the range? is there any tutorial youve made?

  • @casianreport3318
    @casianreport3318 Před 4 lety +1

    this is piss me off. I replicate this entirely with no mistakes, and when i run ADD button, do not work. The problem is that Somethimes eventListener do not listen or i do not know. Purley do not work. Stuck after add button and the event listener. That step is not working. ANY IDEAS!? I went over the video and recreated twice but no luck. Works up till the last step. Then Done!

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 4 lety

      Watch this lo learn how to troubleshoot your code czcams.com/video/flxj-QB50zo/video.html

  • @anganaster19
    @anganaster19 Před 4 lety

    Thank you for the video. I did exactly the same code as the video, everything works almost but at the end when we get the input in the texts Item and Qty and click Add button, doesn't insert any data to the Google sheet. I tried checking the CZcams video Google Apps Script & Web App Debugging of yours to debug but when I am trying to publish the code as "Deploy as web app", the web app gives the error - "Script function not found: doGet". Please help.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 4 lety

      You don't need to deploy as web app. Just right click on the sidebar and inspect.

  • @saisrinivasavvaru1218
    @saisrinivasavvaru1218 Před 4 lety

    Thanks for your tutorials.
    is not working properly with Bootstrap.
    Is there any other way to achieve it?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 4 lety

      What's not working properly? What have you tried?

    • @saisrinivasavvaru1218
      @saisrinivasavvaru1218 Před 4 lety

      @@ExcelGoogleSheets ibb.co/Sdsbm1W
      My drop-down has around 100 items which is not easy to select. So I chose to use . But when the form loads it also shows all options on top of the form. Without the everything works fine.
      After doing a quick search I found that Bootstrap isn't compatible with datalist.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 4 lety

      Screenshot doesn't help. What's your HTML?

    • @saisrinivasavvaru1218
      @saisrinivasavvaru1218 Před 4 lety

      @@ExcelGoogleSheets Bootstrap isn't compatible with datalist at least on chrome as said in this post. stackoverflow.com/questions/48722834/how-to-use-html-datalist-with-bootstrap
      Fixed it using www.w3schools.com/tags/tag_datalist.asp
      datalist {
      display: none !important;
      }

  • @rohanvkumawat
    @rohanvkumawat Před 4 lety +1

    How do you tab in multiple rows at the same time? @ 9:22

    • @jaysonsiebold
      @jaysonsiebold Před 3 lety

      Select multiple rows and hit tab a couple times

  • @tiktik9036
    @tiktik9036 Před 3 lety

    How to add more items to user menu with different html files

  • @ravichandranaikanavre1561

    Hello Sir, Please can you tell me How can we send data from spreadsheet to form?

  • @pichpituseng5096
    @pichpituseng5096 Před 4 lety

    I want to set a user have permission to use form but can't edit on worksheet. Any way to do that?

  • @ceciliahernandez2708
    @ceciliahernandez2708 Před 4 lety

    Your tutorial is great but the menu doesn't appear when I refresh the sheet =(.
    I checked every line but I couldn't find anything wrong.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 4 lety +1

      Sometimes having a good night sleep and checking the next day works wonders.

  • @tunaung8838
    @tunaung8838 Před 3 lety

    Does someone know how to make input value as text in this google sheet form?

  • @AndreasHakansson
    @AndreasHakansson Před 4 lety

    Great content! Can I download the script and html file somewhere? I got stuck in the end and the button didn't work. Thanks!

    • @AndreasHakansson
      @AndreasHakansson Před 4 lety +2

      Solved ..used "clicked" instead of "click" in the eventhandler. =/

  • @mekdimtilahun9535
    @mekdimtilahun9535 Před 4 lety

    Below is the script I wrote per your instructions. However I am getting this error message
    "HtmlService.createTemplateFormFile is not a function "
    //...
    function loadForm() {

    const htmlForSidebar=HtmlService.createTemplateFormFile("uform");
    const htmlOutput=htmlForSidebar.evaluate();

    const ui = SpreadsheetApp.getUi();
    ui.showSidebar(htmlOutput);
    }
    ...//
    Can you help

  • @georgschoeppen6585
    @georgschoeppen6585 Před 4 lety

    Hi guys. I'm just starting with gs. I'm stuck right in the beginning (first running the app ~ 5:05). It shows the sidebar, but it doenst show the "Hello World" beneath. I just copied the starter template from bootstrap like you did. Any tip?

  • @jcheng1981
    @jcheng1981 Před 3 lety

    on ws.appendRow({rowData.item,rowData.qty]); i get typeError cannot read property 'item;

  • @accendo88
    @accendo88 Před 4 lety

    Does the form work for mobile input?

  • @kennethforbin5604
    @kennethforbin5604 Před 4 lety

    Thank you again sir. Question: Can the user be able to mess with already entered data in the sheet? Is there a way to lock it so they can only enter in from the form?

  • @ravichandranaikanavre1561

    How can we read spreadsheet row into form?

  • @setioryski5961
    @setioryski5961 Před 4 lety

    Stuck for 1 month
    how i can calculate 2 date from html input ?
    I want do checkout date - checkin date input.
    please help

  • @vikram-bhalla
    @vikram-bhalla Před 4 lety

    Thanks for your video. As soon as I click the button on the HTML, I receive an error 'ERROR: Authorization is required to perform that action.'. I have checked the authorization and it looks fine. I went here -> myaccount.google.com/permissions and checked the authorization status and it looks fine.
    Has access to:
    Google Docs
    - See, edit, create, and delete your spreadsheets in Google Drive
    Additional access
    - Display and run third-party web content in prompts and sidebars inside Google applications
    Please guide - what am I missing?

  • @bunthoeurnkhouth6754
    @bunthoeurnkhouth6754 Před 3 lety

    how to make the form work on mobile?

  • @stefangeudens4250
    @stefangeudens4250 Před 3 lety

    I Get.a ReferenceError " Htmlservice is not defined", what does this mean??

  • @jithinsamuelthomas8578

    Hey, I wrote the script same as yours but I am getting the following error while running funcs script file:
    "TypeError: Cannot read property 'item' of undefined (line 7, file "funcs")".
    The line number and codes are exactly same as yours. Please do help!

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 4 lety

      Check again, it can't be the same.

    • @jithinsamuelthomas8578
      @jithinsamuelthomas8578 Před 4 lety +1

      @@ExcelGoogleSheets Figured it out. I had to manually change the function to be run on the top bar to anotherFunc(). Thanks.

    • @wesleysodre
      @wesleysodre Před 4 lety

      @@jithinsamuelthomas8578 i have same problem: "TypeError: Cannot read property 'item' of undefined (line 7, file "funcs")". Please do help

    • @govugowrishanker4107
      @govugowrishanker4107 Před 3 lety

      @@jithinsamuelthomas8578 hey jithin would you please let me know how exactly you solved the problem

    • @hengkanglim
      @hengkanglim Před 3 lety

      Hi Jithin, I understand that you have resolved it for the "TypeError :Cannot read property 'ítem' of undefined. I am having the same error like yours. Can you please share how you have resolved it ? Thanks a lot.

  • @angelreyesjr.5078
    @angelreyesjr.5078 Před 4 lety

    I'm having problem running the funcs.gs file can you help me with this?
    TypeError: Cannot read property 'item' of undefined (line 7, file "func")
    function addNewRow(rowData){

    const currentDate = new Date();

    const ss = SpreadsheetApp.getActiveSpreadsheet();
    const ws = ss.getSheetByName("Results");
    ws.appendRow([rowData.item,rowData.qty, currentDate]);
    }
    I copy all the data you did in uform.html. The form did came up on spreadsheet but when I try to put some data and press Add it doesn't went to my spreadsheet. I'm a newbie on this but I'm very interested on learning it..

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 4 lety

      The mistake isn't here. Share your html file.

    • @angelreyesjr.5078
      @angelreyesjr.5078 Před 4 lety

      @@ExcelGoogleSheets











      Item Name




      Quantity Received



      Save







      function addRecord(){
      var item = document.getElementById("item-name");
      var qty = document.getElementbyId("qty-received");
      var rowData = {item: item.value,qty: qty.value};
      google.script.run.addNewRow(rowData);
      }
      document.getElementById("btn").addEventListner("click",addRecord);


      ...

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 4 lety

      addEventListner is misspelled, should be addEventListener

    • @angelreyesjr.5078
      @angelreyesjr.5078 Před 4 lety

      I change it, but still got the same error and can't add the entered data into the spreadsheet.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Před 4 lety

      Don't run the function manually, you'll get an error. You need to use the button in the form.

  • @felipelobato99
    @felipelobato99 Před 5 měsíci

    Code?