Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9194005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:18:01+00:00 2026-06-17T21:18:01+00:00

I have built a couple of simple functions which return cell values in Google

  • 0

I have built a couple of simple functions which return cell values in Google Scripts. I have also created at simple template HTML file, and have tried following Google’s HTML Service documentation!, but my HTML template output still doesn’t work for me.

Firstly, my JS in my .GS file:

function doGet() {
  return HtmlService.createTemplateFromFile('TemplateName').evaluate();
}

function getStarData2() {
  var ss = SpreadsheetApp.openById("key in here").getRange("A2").getValue();
  //Logger.log(ss);
  return ss;
}

And my HTML:

...<span><? getStarData2(); ?></span>...

I have tried a variety of different things to get it working, however, I find it either runs but nothing displays or it runs or it returns a variety of different errors depending on what I try.

I would imagine that this is a very simple fix for all you experts out there so your help is greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:18:03+00:00Added an answer on June 17, 2026 at 9:18 pm

    Try using <?= getStarData2(); ?> instead of <? getStarData2() ?>.

    That equals sign basically says, “Run this function and then print out whatever gets returned here.” Otherwise, you’re just running that function and doing nothing with the result.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built a site which requires user to login. Now I have decided
I have built up an array of objects, created from a class, I wrote
I have built a Custom MaskedTextBox , changing the values of BeepOnError and AsciiOnly
I have built the UI for my Google Chrome Extension, but I am trying
I have built a website and intend users to login with their google account,
I'm learning to develop apps using Qt Creator. I have built a simple app
I have what I think is a simple problem to which I have found
I have a simple POJO library (build using NetBeans 7.1) and couple of projects
I have a complex build process to generate a couple of python extension modules
We are using TFS build and we have a couple of custom steps within

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.