Readmatrix / readtable works on ThingsSpeak ?
2 ビュー (過去 30 日間)
古いコメントを表示
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,
0 件のコメント
回答 (1 件)
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:\' ).
0 件のコメント
コミュニティ
その他の回答 ThingSpeak コミュニティ
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!