+ Reply to Thread
Results 1 to 8 of 8

Problem Debugging Microsoft Office Script in Excel

  1. #1
    Registered User
    Join Date
    06-22-2016
    Location
    Vancouver
    MS-Off Ver
    2010
    Posts
    11

    Problem Debugging Microsoft Office Script in Excel

    Good afternoon,

    I am encountering an issue of automating the embedding of an image in a cell in Excel.

    I found a solution through using web Excel and automation of a workbook through Microsoft script (not VBA...).

    The solution included a script which I tweaked for my purpose.

    Please find attached a screenshot of the problem I am encountering with it.

    Also please find below the entirety of the script.

    Any suggestions/help to reconcile that problem would be appreciated!

    beaverbuzz

    Microsoft Script Problem (1).png
    Last edited by beaverbuzz85; 08-19-2022 at 06:29 PM.

  2. #2
    Registered User
    Join Date
    06-22-2016
    Location
    Vancouver
    MS-Off Ver
    2010
    Posts
    11

    Re: Problem Debugging Microsoft Script in Excel

    Here is the code (it wasn't letting me post it with the main message):

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-22-2016
    Location
    Vancouver
    MS-Off Ver
    2010
    Posts
    11

    Re: Problem Debugging Microsoft Script in Excel

    Also, I just read the agreement terms of this website. I had posted an identical question on MrExcel but no one answered.

    I hope to have better luck here...

  4. #4
    Forum Contributor
    Join Date
    02-25-2022
    Location
    Dallas, Texas
    MS-Off Ver
    Office 365
    Posts
    174

    Re: Problem Debugging Microsoft Script in Excel

    Just guessing. I'm not really familiar with Office Scripts but from error message it thinks response is of type RequestInfo. Maybe response is a keyword. Just try a different name for response like resp.

    BTW, you might want to change title to 'Office Scripts'.
    Last edited by mogul; 08-19-2022 at 06:33 PM.

  5. #5
    Registered User
    Join Date
    06-22-2016
    Location
    Vancouver
    MS-Off Ver
    2010
    Posts
    11

    Re: Problem Debugging Microsoft Script in Excel

    Thanks for the suggestion mogul. Unfortunately, the same problem exists after changing the name of the variable "response" to "resp".

  6. #6
    Forum Contributor
    Join Date
    02-25-2022
    Location
    Dallas, Texas
    MS-Off Ver
    Office 365
    Posts
    174

    Re: Problem Debugging Microsoft Office Script in Excel

    I looked at your code and did a little research.

    const response = await fetch(sheet.getRange("I7"));

    should be

    const response = await fetch(sheet.getRange('I7').getText());


    I would break it up. Log url to make sure it is right.

    const url = sheet.getRange('I7').getText();
    console.log(url);
    const response = await fetch(url);

  7. #7
    Registered User
    Join Date
    06-22-2016
    Location
    Vancouver
    MS-Off Ver
    2010
    Posts
    11

    Re: Problem Debugging Microsoft Office Script in Excel

    That worked!

    Thank you very much mogul for your help.

  8. #8
    Forum Contributor
    Join Date
    02-25-2022
    Location
    Dallas, Texas
    MS-Off Ver
    Office 365
    Posts
    174

    Re: Problem Debugging Microsoft Office Script in Excel

    Welcome. Might want to mark it as solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 01-09-2021, 04:51 PM
  2. New user needing help with debugging vba script
    By kadoma in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-01-2019, 08:18 PM
  3. Microsoft Excel Stimulation Problem
    By antmarc in forum Excel General
    Replies: 0
    Last Post: 12-02-2014, 03:56 AM
  4. Microsoft Script Editor (Excel 2000)
    By tigertim71 in forum Excel General
    Replies: 1
    Last Post: 07-28-2008, 12:50 PM
  5. Microsoft excel has encountered a problem
    By Josh_123456 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-01-2007, 03:25 PM
  6. Microsoft Script Editor?
    By JP Gubbins in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-28-2005, 03:05 PM
  7. Replies: 0
    Last Post: 02-05-2005, 04:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1