---
title: BinaryFormat.Text – อ่านข้อความจากไฟล์ Binary
url: https://www.thepexcel.com/functions/power-query/binary-functions/binaryformat-text/
type: function-explainer
program: Power Query
syntax: "BinaryFormat.Text(length as number, optional encoding as nullable text) as binary"
date: 2025-12-12
updated: 2025-12-17
scores:
  popularity: 3
  difficulty: 5
  usefulness: 3
---

# BinaryFormat.Text – อ่านข้อความจากไฟล์ Binary

> อ่านข้อความจากไฟล์ Binary

## คำอธิบาย

BinaryFormat.Text สร้าง Binary Format Specifier สำหรับอ่านข้อความจากไฟล์ Binary โดยใช้การเข้ารหัสที่ระบุ

## Syntax

```excel
BinaryFormat.Text(length as number, optional encoding as nullable text) as binary
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| length | Yes | number |  | จำนวนไบต์ที่ต้องอ่าน |
| encoding | No | nullable text | null | การเข้ารหัส (เช่น "utf-8") |

## ตัวอย่าง

### 1. ตัวอย่างที่ 1: อ่านข้อความ

```excel
BinaryFormat.Text(10, "utf-8")
```

**ผลลัพธ์:** `Binary Format Specifier`

สร้าง specifier สำหรับอ่าน 10 ไบต์เป็นข้อความ UTF-8

## ฟังก์ชันที่เกี่ยวข้อง

- [BinaryFormat.Byte – รูปแบบไบต์](https://www.thepexcel.com/functions/power-query/binary-functions/binaryformat-byte/)
- [Binary.FromText – แปลงข้อความเป็นข้อมูลไบนารี่](https://www.thepexcel.com/functions/power-query/binary-functions/binary-fromtext/)

## แหล่งข้อมูลเพิ่มเติม

- [Microsoft Learn: BinaryFormat.Text](https://learn.microsoft.com/en-us/powerquery-m/binaryformat-text) _(documentation)_

---

_Source: [https://www.thepexcel.com/functions/power-query/binary-functions/binaryformat-text/](https://www.thepexcel.com/functions/power-query/binary-functions/binaryformat-text/)_
