---
title: List.ConformToPageReader – แปลง List ของ Record เป็น Table สำหรับ Page Reader
url: https://www.thepexcel.com/functions/power-query/list-functions/list-conformtopagereader/
type: function-explainer
program: Power Query
syntax: "List.ConformToPageReader(list as list, optional options as nullable record) as table"
date: 2025-12-03
updated: 2025-12-26
scores:
  popularity: 5
  difficulty: 4
  usefulness: 5
---

# List.ConformToPageReader – แปลง List ของ Record เป็น Table สำหรับ Page Reader

> List.ConformToPageReader ใช้ภายในเพื่อแปลง List ของ Record เป็น Table ตาม Schema ที่กำหนด เหมาะสำหรั

## คำอธิบาย

List.ConformToPageReader ใช้ภายในเพื่อแปลง List ของ Record เป็น Table ตาม Schema ที่กำหนด เหมาะสำหรับโครงสร้างข้อมูลที่ Page Reader ต้องการ

## Syntax

```excel
List.ConformToPageReader(list as list, optional options as nullable record) as table
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| list | Yes | list |  | List ที่ต้องแปลงเป็น Table สำหรับ Page Reader ซึ่งมักจะเป็น List ของ Record |
| options | No | nullable record | null | Record ที่มีตัวเลือก (options) สำหรับการกำหนดค่า โดยทั่วไปมักจะเป็น null |

## เคสการใช้งาน

### การใช้ภายในโดย Power BI

ฟังก์ชันนี้ถูกใช้โดย Power BI เองเมื่อมีการแสดงข้อมูลจาก List ของ Record ในรายงานที่ต้องการโครงสร้างแบบ Table ที่ชัดเจน

### การเตรียมข้อมูลสำหรับ Output เฉพาะ

หากมีการพัฒนา Custom Connector หรือส่วนเสริมที่ต้องการส่งข้อมูลในรูปแบบเฉพาะที่ Page Reader ต้องการ (ซึ่งไม่แนะนำให้ใช้ทั่วไป)

## ตัวอย่าง

### 1. แปลง List ของ Record เป็น Table ด้วย options เป็น null

```excel
let
    SalesData = 
    {
        [Product = "A", Amount = 1000],
        [Product = "B", Amount = 2000]
    },
    Result = List.ConformToPageReader(SalesData, null)
in
    Result
```

**ผลลัพธ์:** `| Product | Amount |
|---------|--------|
| A       | 1000   |
| B       | 2000   |`

แปลง SalesData (List ของ Record) เป็น Table โดยส่ง null เป็นพารามิเตอร์ options ซึ่งเป็นวิธีใช้งานแบบทั่วไป

### 2. ใช้ในบริบทของ generated code จาก Power BI

```excel
let
    Source = SomeFunction(...),
    ConvertedTable = List.ConformToPageReader(Source, null)
in
    ConvertedTable
```

**ผลลัพธ์:** `Table ที่ได้จากการแปลง Source`

ในความเป็นจริง คุณมักจะเห็นฟังก์ชันนี้ในโค้ดที่ Power BI auto-generate แทนที่จะเขียนด้วยตัวเองครับ

### 3. เปรียบเทียบกับ Table.FromRecords (วิธีที่ดีกว่า)

```excel
let
    CustomerData = 
    {
        [Name = "John", Age = 30, City = "Bangkok"],
        [Name = "Jane", Age = 28, City = "Chiang Mai"]
    },
    ConformMethod = List.ConformToPageReader(CustomerData, null),
    FromRecordsMethod = Table.FromRecords(CustomerData)
in
    FromRecordsMethod
```

**ผลลัพธ์:** `| Name | Age | City      |
|------|-----|----------|
| John | 30  | Bangkok  |
| Jane | 28  | Chiang Mai |`

ถึงแม้ว่า List.ConformToPageReader จะทำงานได้เหมือนกัน แต่ Table.FromRecords เข้าใจง่ายกว่า และถูก document อย่างเต็มที่ ดังนั้นจึงเป็นตัวเลือกที่ดีกว่าสำหรับโค้ด M ที่เขียนด้วยตัวเอง

## หมายเหตุเพิ่มเติม

- ผมจะบอกว่า ถ้าคุณเห็นฟังก์ชันนี้ในโค้ด M ที่ copy มาจาก Power BI สูตร แค่ปล่อยไว้อย่างนั้นละครับ เพราะ auto-generated code มันทำงานถูกต้องแล้ว

- ส่วนตัวผม ถ้าคิดจะแปลง List เป็น Table ให้ใช้ Table.FromRecords หรือ Table.FromList ซึ่งเข้าใจง่ายกว่า และใช้ได้อย่างมั่นใจ

- ผมเคยเจอคนถามว่า Function นี้ใช้ทำไม บอกเลยว่า มันใช้เพื่ออ่าน Page Reader ข้อมูล ซึ่งเป็นกลไกภายในของ Power BI นั่นแหละ

## คำถามที่พบบ่อย

**Q: ควรใช้ List.ConformToPageReader ในโค้ด M ของเราโดยตรงหรือไม่?**

ผมบอกคุณตรงๆ เลยว่า ไม่ควรครับ เพราะมันเป็นฟังก์ชันสำหรับใช้ภายใน ถ้ามันเกิด error หรือทำงานไม่ถูกต้อง ผมก็จะไม่มีวิธีช่วยอะไรเพราะ Microsoft ไม่ได้ document มันเลย

**Q: ถ้าผมเห็นฟังก์ชันนี้ใน generated code ควรลบออกได้หรือไม่?**

อย่าลบนะครับ ปล่อยไว้อย่างนั้นดีกว่า เพราะมันถูก auto-generate เพื่ออ่าน Page Reader ข้อมูลที่ถูกต้อง ถ้าคุณลบมันออก อาจจะเกิด error ได้

**Q: อะไรคือทางเลือกที่ดีกว่า?**

ผมแนะนำให้ใช้ Table.FromRecords หรือ Table.FromList ซึ่งสามารถ document และสนับสนุนได้อย่างเต็มที่ ถ้าคุณเขียนโค้ด M ด้วยตัวเองนะครับ

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

- [Table.FromList – สร้างตารางจาก List](https://www.thepexcel.com/functions/power-query/table-functions/table-fromlist/)
- [Table.FromRecords – สร้างตารางจากรายการ Record](https://www.thepexcel.com/functions/power-query/table-functions/table-fromrecords/)
- [Table.Schema – จัดการตาราง](https://www.thepexcel.com/?post_type=function-explainer&p=38016)

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

- [Microsoft Learn: List.ConformToPageReader (Restricted Access)](https://learn.microsoft.com/en-us/powerquery-m/list-conformtopagereader) _(official)_
- [G Com Solutions: List.ConformToPageReader Example](https://www.gcomsolutions.co.uk/blog/power-bi-list-conformtopagereader-function-power-query-m) _(article)_

---

_Source: [https://www.thepexcel.com/functions/power-query/list-functions/list-conformtopagereader/](https://www.thepexcel.com/functions/power-query/list-functions/list-conformtopagereader/)_
