Coder Social home page Coder Social logo

scripts's People

Contributors

lg-experiment avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scripts's Issues

Line 46 error

Hello,

I have this error when I use the script : "Line 46: Cannot read properties of undefined (reading โ€˜0โ€™)"

Why ? any help please ?

I correctly set the key in excel. I have automate tab. I am working with office 365 online.

Thanks for help.

undefined is not an object (evaluating 'json.choices[0]')

I have downloaded the XelPlus ASK AI in EXCEL.xlsx file, and copied the ts script into the Code Editor. I have replaced the Initial "button" with a new button linked to the Open AI in Excel script. I have established an API, and have copied it to cell B1 on the "API" tab. I have entered "Who won the 1985 World Series?" into cell B2 on the "Prompt" tab. When I run the code, I get the error "undefined is not an object (evaluating 'json.choices[0]'). I have added a console.log statement to write out json() following the "await response.json()" statement. The output appears to be blank.

OpenAI in Excel script is running, but not returning the correct answer

Great video! I got the script to run without error. However, it doesn't answer the question I write into cell B2 on the 'Prompt' sheet. The first time I run it, it returns an answer of sorts, but it isn't an answer to the question I've asked. Subsequent running of the scripts returns random lines of code. I must have missed a step somewhere, but I can't figure it out. Any help?

image

No output result

I've tried to follow the instruction on the video but I found the following issue ๐Ÿ‘

  1. if tI use the ts code as is, I get an error ("type error"). I was able to fix the problem enclosing the provided sript inside this code

function main(workbook: ExcelScript.Workbook) {
// Your code here
}

  1. after fixing above problem, I can input a question but I have no answer. Nor errors or warning in the output console.

API works, if I use a curl request with similar settings for model and prompt, I get my answer but in xls nothing happen.
I also added some extra logging lines but still no error in Output or Problems view.

Thanks for support.

Bring ChatGPT inside Excel issue

Dear Leila,

I copy pasted your office script into code editor and this is the error message I got:
Line 46: Cannot read properties of undefined (reading '0') Can you help me?

This is the solution proposal from chat gpt but it didn't really help me:
"The error message "Cannot read properties of undefined (reading '0')" on line 45 typically means that you are trying to access an index of an array or an object property that does not exist. The error message suggests that the object or array you are trying to access is undefined.

To solve this issue, you need to make sure that the object or array you are accessing is defined and contains the property or index you are trying to access. Here are some steps you can take to solve the error:

Check if the object or array you are trying to access is defined. If it is undefined, make sure it is initialized properly.

Check if the property or index you are trying to access exists. If it does not exist, you may need to create it or modify your code to access a different property or index.

Check if the object or array you are trying to access is being modified or deleted before the error occurs. If it is, you may need to modify your code to prevent these actions or ensure they happen in the correct order.

Use console.log statements to log out the values of the variables involved in the error. This can help you pinpoint where the error is occurring and what values are causing the issue.

By following these steps, you should be able to solve the "Cannot read properties of undefined (reading '0')" error on line 45."

"Script is running" but nothing happens

Windows 10, office 365. I pasted in the .ts and put in the apiKey. I can run it, no compile errors, but it never terminates.
Pity there is no way to single step I Officescript code.
I put in a console.log but nothing happened.

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.