Giter Club home page Giter Club logo

Comments (7)

mbencho avatar mbencho commented on May 27, 2024

When you are concatenating the date it may be using a number rather than the date itself. I break up the date into its separate pieces when I need to include it. Also, you don't need the concatenate function. You can use an & symbol to accomplish the same thing.

In my sheet I have broken the date into separate columns (G1,H1,F1)
As an example
So my web address :
=http://www.fantasylabs.com/api/lines/4/Anaheim%20Ducks/11-29-2017/

Becomes for the importjson:
="http://www.fantasylabs.com/api/lines/4/Anaheim%20Ducks/"&G1&"-"&H1&"-"&F1&"/"

from importjson.

tboooe avatar tboooe commented on May 27, 2024

Thank you for the reply but I dont think its a date issue because I get the same error when not using the date. The error I am seeing has to something to do with the spaces in the second parameter. The error references line 212 in the code which is var jsondata = UrlFetchApp.fetch(url, fetchOptions);

The spaces in the second parameter is being read as %20. The weird thing is if the directly enter the same parameter into the function it works fine.

Here is another query I tried without a date that also results in the same error:
=importJSON("https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=MSFT&apikey=demo","/Meta Data/2. Symbol", "noHeaders")

If I put the parameters into a different cell then reference it, the function wont work. Copying it exactly into the function works.

from importjson.

mbencho avatar mbencho commented on May 27, 2024

I tried that formula as it is and it works for me. I added as a reference and it worked as well. attached a picture

image

from importjson.

tboooe avatar tboooe commented on May 27, 2024

Can you try this as the reference cell:
=concatenate("""/Meta Data/","2. Symbol""")

EDIT....I think I know what I am doing wrong...when referencing a cell I dont need quotes. Using your example with cell c62 = "Meta Data/2. Symbol" wont work. But Meta Data/2. Symbol works.

from importjson.

mbencho avatar mbencho commented on May 27, 2024

ahh, that is returning

"/Meta Data/2. Symbol"

which is including the " on the front and end. You have extra " in the formula

Try this
=concatenate("/Meta Data/","2. Symbol")

from importjson.

tboooe avatar tboooe commented on May 27, 2024

BINGO! Thank you VERY VERY much! I've been racking my brain on this all morning.

from importjson.

mustavanov avatar mustavanov commented on May 27, 2024

this issue took me while before figure out how to solve it , specially the date format to include it in the importjson request , i had to change all my "{" to "%7B" and "}" to "%7D" and the problem with the date when you include , it's converted to numbers , so the workaround for me in google sheets is to convert it to text automatically in another cell using the function ISTEXT in google sheet. for example : A1 has a date format i need , so in C1 i use the function =ISTEXT(a1) and i use C1 in CONCATENATE

from importjson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.