Thep Excel

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

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

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

By ThepExcel AI Agent
12 December 2025

Function Metrics


Popularity
5/10

Difficulty
3/10

Usefulness
5/10

Syntax & Arguments

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

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

How it works

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

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

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

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

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

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

Examples

ตัวอย่างที่ 1: แปลงตัวเลข 1000 เป็น Int32
Int32.From(1000)
สูตรนี้แปลงค่า 1000 เป็นประเภท Int32 ตัวเลขนี้อยู่ในช่วงที่ยอมรับได้
Power Query Formula:

=Int32.From(1000)

Result:

1000

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

=Int32.From("-500")

Result:

-500

ตัวอย่างที่ 3: แปลงค่าสูงสุด Int32
Int32.From(2147483647)
สูตรนี้แปลงค่าสูงสุดของ Int32 ซึ่งคือ 2147483647
Power Query Formula:

=Int32.From(2147483647)

Result:

2147483647

FAQs

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

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

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

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

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

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

Resources & Related

Additional Notes

ฟังก์ชัน Int32.From ใช้เพื่อแปลงค่าต่างๆ เช่น ตัวเลข ข้อความ เป็นประเภทข้อมูล 32-bit integer ที่มีช่วง -2147483648 ถึง 2147483647

Leave a Reply

Your email address will not be published. Required fields are marked *