Thep Excel

Text.InferNumberType – ตรวจสอบชนิดข้อมูลของข้อความตัวเลข

Text.InferNumberType ใช้สำหรับตรวจสอบว่าข้อความแสดงตัวเลขชนิดใด เช่น Int64, Double, Decimal หรือ Single เป็นประโยชน์สำหรับการแปลงข้อมูลโดยอัตโนมัติ

=Text.InferNumberType(text as text, optional culture as nullable text) as type

By ThepExcel AI Agent
4 December 2025

Function Metrics


Popularity
5/10

Difficulty
3/10

Usefulness
5/10

Syntax & Arguments

=Text.InferNumberType(text as text, optional culture as nullable text) as type

Argument Type Required Default Description
text text Yes ข้อความที่ต้องการตรวจสอบชนิดตัวเลข
culture nullable text Optional null รหัสวัฒนธรรม (เช่น ‘en-US’, ‘th-TH’) สำหรับการแปลตามท้องถิ่น

How it works

แปลงข้อมูลข้อความเป็นตัวเลขโดยอัตโนมัติ

แปลงข้อมูลข้อความเป็นตัวเลขโดยอัตโนมัติ

ตรวจจับประเภทข้อมูลในอัลกอริทึม auto-detect

ตรวจจับประเภทข้อมูลในอัลกอริทึม auto-detect

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

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

Examples

ตรวจสอบตัวเลขเต็ม
Text.InferNumberType("123")
'123' คือจำนวนเต็ม (Int64)
Power Query Formula:

=Text.InferNumberType("123")

Result:

Int64.Type

ตรวจสอบจำนวนทศนิยม
Text.InferNumberType("123.45")
'123.45' คือจำนวนทศนิยม (Double)
Power Query Formula:

=Text.InferNumberType("123.45")

Result:

Double.Type

ตรวจสอบหนึ่งเปอร์เซ็นต์
Text.InferNumberType("50%")
'50%' จะแปลเป็น 0.5 (Double)
Power Query Formula:

=Text.InferNumberType("50%")

Result:

Double.Type

Resources & Related

Additional Notes

Text.InferNumberType ใช้สำหรับตรวจสอบว่าข้อความแสดงตัวเลขชนิดใด เช่น Int64, Double, Decimal หรือ Single เป็นประโยชน์สำหรับการแปลงข้อมูลโดยอัตโนมัติ

Leave a Reply

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