Readmatrix / readtable works on ThingsSpeak ?

조회 수: 4 (최근 30일)
sylvain didelot
sylvain didelot 2019년 10월 11일
답변: Vinod 2019년 10월 11일
Hello, I'm trying to collect data to plot on :
https://thingspeak.com / Apps / MATLAB Visualisations / Custom (no starter code) / Edit / MATLAB Code :
M = readmatrix('C:\mypath\TEST.xlsx','Sheet','TEST1')
or
T = Readtable('C:\mypath\TEST.xlsx','Sheet','TEST1')
But it returns :
Error using readmatrix (line 148) Unable to find or open 'C:\mypath\TEST.xlsx'.
Check the path and filename or file permissions. Error in Custom (no starter code) 13 (line 1) M = readmatrix('C:\mypath\TEST.xlsx','Sheet','TEST1')
or
Error using readtable (line 223) Unable to open file '‪C:\mypath\TEST.xlsx' as a workbook.
Check that the file exists, read access is available, and the file is a valid spreadsheet file. Error in Custom (no starter code) 8 (line 1) T = readtable('‪C:\mypath\TEST.xlsx','Sheet','TEST1')
Even with a single excel sheet, it does the same.
So, does import file.csv is the only way to collect data from an excel on ThingSpeak ?
Thanks you,

답변 (1개)

Vinod
Vinod 2019년 10월 11일
If you have access to desktop MATLAB or MATLAB online, you can load the contents of the CSV file in MATLAB and use thingSpeakWrite to write the data to a channel.
If you don't have access to MATLAB, the options are to use the CSV import functionality on ThingSpeak, or, to read the CSV file in your language of choice and write it to the channel using the documented bulk_update API on ThingSpeak.
If you're trying to use the MATLAB Analysis app on ThingSpeak, keep in mind it operates in the cloud and cannot access your local drive ('C:\' ).

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

카테고리

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

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by