CSV format data with API export only 1st field

조회 수: 1 (최근 30일)
Olivier HUBERT
Olivier HUBERT 2019년 12월 23일
답변: Olivier HUBERT 2019년 12월 24일
Hello,
I'm using following command to output my data in CSV format
Problem is that file is outputed with only 1st field
created_at,entry_id,field1
2019-12-19 21:08:00 UTC,2228,8.09
2019-12-19 21:09:24 UTC,2229,8.09
2019-12-19 21:10:47 UTC,2230,50.09
2019-12-19 21:12:11 UTC,2231,24.09
How can I do to export all fields?
This channel has 5 fields.
Thanks a lot for your support
I wish you a merry Christmas

답변 (3개)

Vinod
Vinod 2019년 12월 24일
I think you're looking for the API documented here: https://www.mathworks.com/help/thingspeak/readdata.html

Olivier HUBERT
Olivier HUBERT 2019년 12월 24일
편집: Olivier HUBERT 2019년 12월 24일
Yes you are right but it said in the top "Read data from all fields in a channel".
My question is why I got only 1st field in the downloaded data file when using this command line
This channel have 5 fields in total.
Thanks for your help
Olivier
  댓글 수: 1
Vinod
Vinod 2019년 12월 24일
Your request is specifically requesting only field 1.
https://api.thingspeak.com/channels/<channel_id>/fields/1.csv?api_key=APIKEY&start=2017-01-20&results=8000
If you want all fields, you have to get the entire channel feed
https://api.thingspeak.com/channels/<channel_id>/feeds.<format>

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


Olivier HUBERT
Olivier HUBERT 2019년 12월 24일
Oups... I did not have notice in the doc sorry Thanks a lot Olivier

커뮤니티

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

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by