Apps Script: HTML Templating

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

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

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

    Thanks for the explanation. I have a question here. Will the scriplets/printed scriplets work with html called from container bound scripts or will it work only when the html is called from a doGet() function in a webapp standalone script?

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

    The browser is NOT displaying the static map images, any idea why?

  • @1endell
    @1endell 5 лет назад

    Very nice, man!
    Excellent work

  • @jeannettemillandvigio3579
    @jeannettemillandvigio3579 6 лет назад +1

    When you got an using the gs published url ( because the lacking of the spreasheet key between /d/ and /edit), was there a way to avoid this error from happeding from the begining. Where should I have put the Google Spreasheet key while coding?

    • @JordanRhea
      @JordanRhea  6 лет назад

      Hopefully I answered this question above

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

    Awesome Videos Jordan! I'm stuck in a pinch and need help! I've built an application that displays topics for a number of day. Every "day" page is populated by looping through my days sheet and then it pops it in to a htmlTemplate and sends it back to my main application. The trouble is, its tooo slow! Any ideas?

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

    Show, tem como adicionar um favicon?

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

    Hey everyone, can someone tell me how I form a scriplet: . Is it in the Appscript code, HTML or withing scriplet? I already tried some thing, did not work. Thank you for your help.

  • @admireargumentactivity
    @admireargumentactivity 7 лет назад +2

    Nice work on all your videos! Watched a ton got way more to go, whats your background?

    • @JordanRhea
      @JordanRhea  6 лет назад

      Sorry Martin! I never replied to this. My background is in English education.

  • @jeannettemillandvigio3579
    @jeannettemillandvigio3579 6 лет назад

    Correction When you got an error using the gs published url ( because the lacking of the spreasheet key between /d/ and /edit), was there a way to avoid this error from happeding from the begining. Where should I have put the Google Spreasheet key while coding?

    • @JordanRhea
      @JordanRhea  6 лет назад

      Hi Jeannette, good question. Basically, if your script is opened from inside a spreadsheet, doc, or what-have-you then you can use the method .getActiveSheet(). However, if you create a stand-alone script file, you need to use the key. Does the answer your question?

    • @jeannettemillandvigio3579
      @jeannettemillandvigio3579 6 лет назад

      In your tutorial, it is a stand-alone script, so you need to insert the key somewhere in the code. Where would you place it?
      function doGet(e) {
      var SHEET_ID = e.parameter.sheet_id;
      var html = HtmlService.createTemplateFromFile('summerVacation');
      var responses = SpreadsheetApp.openById(SHEET_ID);
      html.responses = parseResponses(responses.getDataRange().getValues()).sort(function(a,b) {return new Date(a.start) - new Date(b.start);});
      return html.evaluate().setTitle('Summer Vacation Schedule');
      }

    • @jeannettemillandvigio3579
      @jeannettemillandvigio3579 6 лет назад

      I receive Bad value (line 4, file "Code")
      This is my script url
      script.google.com/a/upr.edu/macros/s/AKfycbw5rYnlHEu0cuz--7ec0391Ho6IjzQTJzL_yBzL3wk/dev
      and my key is
      1wVr5vmgFMmlLjzYLTGRjwSDfx3yl7Tgc5ukqfvfdA5U
      I see that I have to follow my script url with a ?sheet_id=
      so it shoul be
      script.google.com/a/upr.edu/macros/s/AKfycbw5rYnlHEu0cuz--7ec0391Ho6IjzQTJzL_yBzL3wk/dev?sheet_id=1wVr5vmgFMmlLjzYLTGRjwSDfx3yl7Tgc5ukqfvfdA5U
      but I would prefer to code it and not to have to enter it every time

    • @jeannettemillandvigio3579
      @jeannettemillandvigio3579 6 лет назад

      I still showing an error, should be another kind of type from myself
      This is what I have

      .vacation {
      display: inline-block;
      position: relative;
      color: white;
      }
      .vacation h3, .vacation h6 {
      position: absolute;
      background-color: darkgreen;
      color:white;
      padding:4px 12px;
      opacity:1;
      transition: all 0.3s;
      }
      .vacation h3:hover, .vacation h6:hover {
      opacity:0;
      }
      .vacation h3 {
      top:20px;
      }
      .vacation h6 {
      bottom:20px;
      right:0;
      }
      .vacation: hover h3, h6 {
      opacity:1;
      }

    • @jeannettemillandvigio3579
      @jeannettemillandvigio3579 6 лет назад

      Where should I place the key?

  • @RolandKuka
    @RolandKuka 6 лет назад

    very good tutorial. Thank you

  • @gemavision7330
    @gemavision7330 7 лет назад +1

    Muito bom. Obrigado por compartilhar.

  • @MarisolFlores-jx6bg
    @MarisolFlores-jx6bg 4 года назад

    Buen dia me marca un error en: var html=HtmlService.createTemplateFromFile("formulario2");
    podria ayudarme
    codigo:
    var sheetId=e.parameter.sheet_id;
    var html=HtmlService.createTemplateFromFile("formulario2");
    var responses=SpreadsheetApp.openById(sheetId);

  • @thenextbigthingsearchwithi3719
    @thenextbigthingsearchwithi3719 6 лет назад

    that really shows how powerful app script is very wonderful indeed

  • @jeannettemillandvigio3579
    @jeannettemillandvigio3579 7 лет назад +1

    You are a TREASURE!

  • @ryaa4494
    @ryaa4494 7 лет назад

    why i got an error in line 11 from code file

    • @JordanRhea
      @JordanRhea  6 лет назад +1

      I think that is because I forgot to put the spreadsheet key in. I corrected myself later in the video.

    • @ryaa4494
      @ryaa4494 6 лет назад

      Jordan Rhea ok,thanks

    • @julia.vasilieva
      @julia.vasilieva 6 лет назад

      @@JordanRhea got an error here: return html.evaluate().setTitle("Tasks");

    • @rokstar343
      @rokstar343 5 лет назад

      @Rhinzz and Julia, I had a typo in my html file and got the same error.
      I had a parenthesis where I should have had a curly bracket.
      So here:
      I had:

  • @alexandre1
    @alexandre1 7 лет назад

    👌

    • @jeannettemillandvigio3579
      @jeannettemillandvigio3579 6 лет назад

      Alexandre, when Rhea got an error on while publishing the google script because the lacking of the spreasheet code between /d/ and /edit, was there a way to avoid this error happeding from the begining. Where should I have put the Google Spreasheet key while coding?

  • @Cuentil
    @Cuentil 7 лет назад +1

    Heroes exist!. Thanks

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

    I like your vids! Check out Moment.js library for date handling. Much easier than formatting and manipulating dates from scratch.

  • @Cuentil
    @Cuentil 7 лет назад +4

    Heroes exist!. Thanks

    • @JordanRhea
      @JordanRhea  6 лет назад

      That is quite the compliment +Esteban. Cheers!

    • @ashiksaleem360
      @ashiksaleem360 5 лет назад

      @@JordanRhea Not All heroes wear cape