---
title: Int32.From – แปลงค่าเป็น 32-bit integer
url: https://www.thepexcel.com/functions/power-query/number-functions/int32-from/
type: function-explainer
program: Power Query
syntax: "Int32.From(value as any, optional culture as nullable text) as nullable number"
date: 2025-12-12
updated: 2025-12-17
scores:
  popularity: 5
  difficulty: 3
  usefulness: 5
---

# Int32.From – แปลงค่าเป็น 32-bit integer

> แปลงค่าเป็น 32-bit integer

## คำอธิบาย

Int32.From แปลงค่าต่างๆ เช่น ตัวเลข (number) ข้อความ (text) เป็นประเภทข้อมูล Int32 ซึ่งเป็นจำนวนเต็ม 32-bit ที่มีช่วงค่า -2147483648 ถึง 2147483647 ใช้สำหรับการทำงานกับระบบที่ต้องการ 32-bit integer API ที่ต้องข้อมูลในรูปแบบนี้ และการคำนวณที่ต้องความแม่นยำของจำนวนเต็ม

## Syntax

```excel
Int32.From(value as any, optional culture as nullable text) as nullable number
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| value | Yes | any |  | ค่าที่ต้องการแปลง (number, text ฯลฯ) ต้องอยู่ในช่วง -2147483648 ถึง 2147483647 |
| culture | No | text | null | สำนัก (culture) สำหรับการแปลงข้อความ |

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

### เชื่อมต่อกับ API ที่ต้อง Int32

แปลงข้อมูลสำหรับส่งไปยัง API ที่ต้องการ 32-bit integer

_เหมาะกับ:_ api-integration

### ประมวลผลข้อมูล ID และรหัส

ใช้สำหรับข้อมูล ID ที่ต้องจำนวนเต็ม 32-bit

_เหมาะกับ:_ id-processing

### การคำนวณระดับต่ำ

ใช้สำหรับการคำนวณที่ต้องข้อมูลประเภท 32-bit integer

_เหมาะกับ:_ low-level-calculation

## ตัวอย่าง

### 1. ตัวอย่างที่ 1: แปลงตัวเลข 1000 เป็น Int32

```excel
Int32.From(1000)
```

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

สูตรนี้แปลงค่า 1000 เป็นประเภท Int32 ตัวเลขนี้อยู่ในช่วงที่ยอมรับได้

### 2. ตัวอย่างที่ 2: แปลงข้อความ "-500" เป็น Int32

```excel
Int32.From("-500")
```

**ผลลัพธ์:** `-500`

สูตรนี้แปลงข้อความ "-500" เป็นค่า Int32 ติดลบ ซึ่งยังอยู่ในช่วงที่อนุญาต

### 3. ตัวอย่างที่ 3: แปลงค่าสูงสุด Int32

```excel
Int32.From(2147483647)
```

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

สูตรนี้แปลงค่าสูงสุดของ Int32 ซึ่งคือ 2147483647

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

⚠️ ฟังก์ชัน Int32.From มีข้อจำกัดของช่วงค่า -2147483648 ถึง 2147483647 ตัวเลขนอกช่วงนี้จะทำให้เกิดข้อผิดพลาด ถ้าต้องช่วงที่ใหญ่กว่า ให้ใช้ Int64.From

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

**Q: ความแตกต่างระหว่าง Int32.From กับ Int64.From**

Int32.From มีช่วงค่า -2.1 พันล้านถึง 2.1 พันล้าน Int64.From มีช่วง -9.2 ล้านล้านถึง 9.2 ล้านล้าน ใช้ Int32.From สำหรับตัวเลขเล็กกว่า

**Q: ถ้าตัวเลขมากกว่า 2147483647 จะเป็นยังไง**

ฟังก์ชันจะส่งคืนข้อผิดพลาด ถ้าต้องตัวเลขที่ใหญ่กว่า ให้ใช้ Int64.From แทน

**Q: สามารถแปลงตัวเลขทศนิยมได้หรือไม่**

ได้แต่จะปัดเศษเป็นจำนวนเต็ม เช่น 1000.7 จะแปลงเป็น 1001

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

- [Int64.From – แปลงค่าเป็น 64-bit integer](https://www.thepexcel.com/functions/power-query/number-functions/int64-from/)
- [Int8.From – แปลงค่าเป็น 8-bit integer](https://www.thepexcel.com/functions/power-query/number-functions/int8-from/)
- [Int16.From – แปลงค่าเป็น 16-bit integer](https://www.thepexcel.com/functions/power-query/number-functions/int16-from/)
- [Number.From – แปลงค่าเป็นตัวเลข](https://www.thepexcel.com/functions/power-query/number-functions/number-from/)

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

- [Microsoft Learn: Int32.From](https://learn.microsoft.com/en-us/powerquery-m/int32-from) _(documentation)_
- [Power Query M Function Reference](https://learn.microsoft.com/en-us/powerquery-m/power-query-m-function-reference) _(documentation)_

---

_Source: [https://www.thepexcel.com/functions/power-query/number-functions/int32-from/](https://www.thepexcel.com/functions/power-query/number-functions/int32-from/)_
