• Welcome to Thaidevtalk.com โปรแกรมเมอร์คุยกัน.
 

เข้าถึงข้อมูลใน Google Sheet แบบ JSON

Started by อั๋น ทรงวุฒิ, 13 December 2020, 08:32:20 PM

Previous topic - Next topic

อั๋น ทรงวุฒิ

อยากทำระบบต้นแบบง่ายๆ โดยดึงข้อมูลจาก Google Sheet เรามีวิธี

1) คีย์ข้อมูลตัวอย่างลงใน Google sheet
2) เลือกเมนู ไฟล์ -> เผยแพร่ไปยังเว็บ => เผยแพร่
3) กดแชร์โดยคัดลอก Link มา
4) แกะ id ของ Sheet ซึ่งจะเป็นอักษรชุดยาวๆ ถูกคั่นด้วยเครื่องหมาย /
5) เอา id ไปแทนที่ใน url ตัวอย่าง

Quotehttps://spreadsheets.google.com/feeds/list/spreadsheetID/worksheetID/public/values?alt=json
spreadsheetID = ค่า id จากข้อ 4
worksheetID = Tab worksheet ที่ 1,2,3 เอาง่ายๆ ก็ลองใส่ 1 ก่อน

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
ยี่ห้อเครื่องพิมพ์ Dotmatrix ยอดนิยมในยุค 80386 (เอปสัน- ตัวพิมพ์เล็ก):
Shortcuts: ALT+S post or ALT+P preview