Borrar filtros
Borrar filtros

Import data from google sheets to matlab

128 visualizaciones (últimos 30 días)
Hüseyin Cagdas Yatkin
Hüseyin Cagdas Yatkin el 12 de Dic. de 2019
Comentada: O.Hubert el 5 de Jun. de 2024
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.

Respuestas (3)

Donald
Donald el 4 de Mzo. de 2021
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 comentarios
thierry Lanoe
thierry Lanoe el 25 de Mzo. de 2023
is there a solution with "protected sheets"
O.Hubert
O.Hubert el 5 de Jun. de 2024
Bennet, have you tried passing the ContentType option to webread (see the help here)?

Iniciar sesión para comentar.


Hiro Yoshino
Hiro Yoshino el 12 de Dic. de 2019
  1 comentario
Hüseyin Cagdas Yatkin
Hüseyin Cagdas Yatkin el 12 de Dic. de 2019
I think this is for the offline files, I want to take from online source which is specifically google sheets.

Iniciar sesión para comentar.


dimuthu chathuranga
dimuthu chathuranga el 9 de Abr. de 2021
I have same problem please help me I want to real time uptade data fron google sheet to mathlab gui

Categorías

Más información sobre Google en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by