A
A
Atmosfire2020-11-26 09:52:49
1C
Atmosfire, 2020-11-26 09:52:49

How to connect to 1C via odata from google sheets?

Hello!
Can anyone suggest how to connect to Odata from 1C using Google Sheets (GAS).
Excel has a built-in connector with an authorization window (or the same Power Query). Everything is ok through it.
I just type in the address in the browser, press enter, enter the authorization data - and everything is also ok.
But you have to do it in Google Sheets. I can't google anything sensible.

I made this option, but it gives an error: "Address is not available" (login, password, server and database name changed, I can't disclose them).

function myFunction() {
    var authdata = Utilities.base64Encode('login'+':'+'password');
    var params = {
      credentials: 'include',
      headers: {
        'Authorization': 'Basic ' + authdata,
      }
      };
   UrlFetchApp.fetch('http://server.net/basename/odata/standard.odata/Catalog_ФизическиеЛица?$format=json', params)
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question