Thep Excel

Json.FromValueแปลง Value เป็น JSON

Json.FromValue ใช้สำหรับแปลงค่าใดๆ เป็นข้อความ JSON สามารถแปลง record, list, number, logical, null และข้อความได้

fx
=Json.FromValue(value, [encoding]) as binary

ความนิยม5/10
ความยาก3/10
ประโยชน์5/10

อัปเดต 4 December 2025

Syntax & Arguments

อาร์กิวเมนต์ ชนิด ค่าเริ่มต้น คำอธิบาย
value any ค่าที่ต้องการแปลงเป็น JSON
[encoding]ไม่บังคับ nullable number UTF8 ประเภทการเข้ารหัสของ JSON output

[ ] = อาร์กิวเมนต์ที่ไม่บังคับ

Json.FromValue ใช้สำหรับแปลงค่าใดๆ เป็นข้อความ JSON สามารถแปลง record, list, number, logical, null และข้อความได้

How it works

สร้าง JSON payload สำหรับ REST API

สร้าง JSON payload สำหรับ REST API

บันทึกข้อมูล record เป็น JSON

บันทึกข้อมูล record เป็น JSON

ส่งข้อมูล structured ไปยัง Web service

ส่งข้อมูล structured ไปยัง Web service

Examples

แปลง Record เป็น JSONText.FromBinary(Json.FromValue([Name="John", Age=30]))

แปลง record เป็น JSON object

fx
=Text.FromBinary(Json.FromValue([Name="John", Age=30]))

ผลลัพธ์{"Name":"John","Age":30}
แปลง List เป็น JSONText.FromBinary(Json.FromValue({1, 2, 3}))

แปลง list เป็น JSON array

fx
=Text.FromBinary(Json.FromValue({1, 2, 3}))

ผลลัพธ์[1,2,3]
ส่งไป APIText.FromBinary(Json.FromValue([ID=123, Name="Test"]))

สร้าง JSON payload สำหรับ API call

fx
=Text.FromBinary(Json.FromValue([ID=123, Name="Test"]))

ผลลัพธ์{"ID":123,"Name":"Test"}

Resources & Related

ฟังก์ชันที่ผู้เขียนโยงไว้กับ Json.FromValue จัดกลุ่มตามหมวด · ชี้ที่ชื่อใดชื่อหนึ่ง แล้วฟังก์ชันที่ใช้คู่กันจะมีจุดทอง

ฟังก์ชันนี้Json.FromValueText functions
Text functions (2)
Text.From

แปลงค่าใดๆ เป็นข้อความ (Text)

Text.FromBinary

Text.FromBinary ใช้สำหรับแปลงค่า Binary เป็นข้อความ โดยใช้การเข้ารหัส UTF-8 เป็นค่าเริ่มต้น รองรับการเข้ารหัสอื่นๆ เช่น UTF-16 และ ASCII

Accessing data functions (1)
Json.Document

Json.Document ใช้สำหรับแปลง JSON text หรือ binary data ให้เป็น Power Query record ทำให้คุณสามารถเข้าถึง field แต่ละตัวได้อย่างง่ายดาย

Comments

อีเมลของคุณจะไม่ถูกเผยแพร่