---
title: Value.FromText – แปลง Text เป็น Value
url: https://www.thepexcel.com/functions/power-query/text-functions/value-fromtext/
type: function-explainer
program: Power Query
syntax: "Value.FromText(text as any, optional culture as nullable text) as any"
date: 2025-12-04
updated: 2025-12-17
scores:
  popularity: 5
  difficulty: 3
  usefulness: 5
---

# Value.FromText – แปลง Text เป็น Value

> แปลง Text เป็นค่าชนิดข้อมูลอื่น

## คำอธิบาย

Value.FromText ใช้สำหรับแปลงข้อความเป็นค่าที่เหมาะสม สามารถแปลงเป็น number, logical, null, datetime, duration หรือ text ตามรูปแบบ

## Syntax

```excel
Value.FromText(text as any, optional culture as nullable text) as any
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| text | Yes | any |  | ข้อความที่ต้องการแปลง |
| culture | No | nullable text | null | รหัสวัฒนธรรม (เช่น 'en-US', 'fr-FR') |

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

### แปลงข้อมูล Text จากแหล่งภายนอก

แปลงข้อมูล Text จากแหล่งภายนอก

### จัดการสกุลเงิน เปอร์เซ็นต์ และตัวเลข

จัดการสกุลเงิน เปอร์เซ็นต์ และตัวเลข

### แปลงตามวัฒนธรรมท้องถิ่น

แปลงตามวัฒนธรรมท้องถิ่น

## ตัวอย่าง

### 1. แปลง Text เป็น Number

```excel
Value.FromText("12345.6789")
```

**ผลลัพธ์:** `12345.6789`

แปลงข้อความตัวเลขเป็น number

### 2. แปลง Percentage

```excel
Value.FromText("25.4%")
```

**ผลลัพธ์:** `0.254`

แปลง '25.4%' เป็น 0.254

### 3. แปลงด้วย Culture

```excel
Value.FromText("€1,190", "fr-FR")
```

**ผลลัพธ์:** `1.19`

ใช้วัฒนธรรม French: , = decimal point

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

- [Text.InferNumberType – ตรวจสอบชนิดข้อมูลของข้อความตัวเลข](https://www.thepexcel.com/functions/power-query/text-functions/text-infernumbertype/)
- [Number.FromText – แปลงข้อความเป็นตัวเลข](https://www.thepexcel.com/functions/power-query/number-functions/number-fromtext/)
- [Value.FromText – แปลง Text เป็น Value](https://www.thepexcel.com/functions/power-query/text-functions/value-fromtext/)

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

- [Microsoft Learn: Value.FromText](https://learn.microsoft.com/en-us/powerquery-m/value-fromtext) _(Official Documentation)_

---

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