แปลง Text เป็น Binary
=Text.ToBinary("Hello")
#binary({72, 101, 108, 108, 111})
แปลงข้อความเป็นค่า Binary
Text.ToBinary ใช้สำหรับแปลงข้อความเป็นค่า Binary โดยใช้การเข้ารหัส UTF-8 เป็นค่าเริ่มต้น รองรับการเข้ารหัส UTF-16 และ ASCII
=Text.ToBinary(text as nullable text, optional encoding as nullable number, optional includeByteOrderMark as nullable logical) as nullable binary
=Text.ToBinary(text as nullable text, optional encoding as nullable number, optional includeByteOrderMark as nullable logical) as nullable binary
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
| text | nullable text | Yes | ข้อความที่ต้องการแปลง | |
| encoding | nullable number | Optional | BinaryEncoding.Utf8 | ประเภทการเข้ารหัส |
| includeByteOrderMark | nullable logical | Optional | false | เพิ่ม Byte Order Mark หรือไม่ |
บันทึกข้อความลงไฟล์ Binary
ส่งข้อมูลแบบ Binary ไป API
เข้ารหัส Binary สำหรับการส่งข้อมูล
=Text.ToBinary("Hello")
#binary({72, 101, 108, 108, 111})
=Text.FromBinary(Text.ToBinary("Test"))
Test
=Binary.ToText(Text.ToBinary("Hello"), BinaryEncoding.Base64)
SGVsbG8="
Text.ToBinary ใช้สำหรับแปลงข้อความเป็นค่า Binary โดยใช้การเข้ารหัส UTF-8 เป็นค่าเริ่มต้น รองรับการเข้ารหัส UTF-16 และ ASCII