MATLAB Answers

Reading data from google spreadsheet

11 views (last 30 days)
Sergio Silveira
Sergio Silveira on 16 Jun 2021
Answered: KSSV on 16 Jun 2021
I'm reading data from a google spreadsheet file using the following code:
url_name = sprintf('',docid);
sheet_data = webread(url_name);
where docid is the spreadsheet's identifier and sheet_data is a table type variable.
The problem is that the headers are all messed up (spaces between words are removed, special characters such as "ã, ç,ô,...", are ignored, and so on) and I'll need them further in the code.
This only occurs with the headers. The other cells in the spreadsheet that contain text are properly imported.
Is there a way to overcome these issues?
Thanks in advance.
  1 Comment
Sergio Silveira
Sergio Silveira on 16 Jun 2021
Just found out a workaround:
url_name = strcat('',docid,'/export?format=xlsx');
Then I read the output.xlsx file (which is formatted as I wish).

Sign in to comment.




Community Treasure Hunt

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

Start Hunting!