필터 지우기
필터 지우기

Import data from google sheets to matlab

조회 수: 128 (최근 30일)
Hüseyin Cagdas Yatkin
Hüseyin Cagdas Yatkin 2019년 12월 12일
댓글: O.Hubert 2024년 6월 5일
Hello guys,
I wanted to import data from google sheets to matlab. However I couldn't find any information about it. Since the google sheets always geting update I can't just copy and paste so I wanted to import new data for every time I run the matlab script. Is there a way?
Thanks in advance.

답변 (3개)

Donald
Donald 2021년 3월 4일
First, find the ID for your Sheet. It's the long string if you look at the URL. For example,
http s://docs.google.com/spreadsheets/d/bladjaljd77442n2j3ljk2j3j2jdkdjad/edit#gid=1498695871
Then it's easy
ID = 'bladjaljd77442n2j3ljk2j3j2jdkdjad'
sheet_name = 'My Sheet';
url_name = sprintf('https://docs.google.com/spreadsheets/d/%s/gviz/tq?tqx=out:csv&sheet=%s',...
ID, sheet_name);
sheet_data = webread(url_name);
  댓글 수: 5
thierry Lanoe
thierry Lanoe 2023년 3월 25일
is there a solution with "protected sheets"
O.Hubert
O.Hubert 2024년 6월 5일
Bennet, have you tried passing the ContentType option to webread (see the help here)?

댓글을 달려면 로그인하십시오.


Hiro Yoshino
Hiro Yoshino 2019년 12월 12일
  댓글 수: 1
Hüseyin Cagdas Yatkin
Hüseyin Cagdas Yatkin 2019년 12월 12일
I think this is for the offline files, I want to take from online source which is specifically google sheets.

댓글을 달려면 로그인하십시오.


dimuthu chathuranga
dimuthu chathuranga 2021년 4월 9일
I have same problem please help me I want to real time uptade data fron google sheet to mathlab gui

카테고리

Help CenterFile Exchange에서 Google에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by