0%

How to add leading zeros to values in a field in an attribute table in ArcMap?

How To: Add leading zeros to values in a field in an attribute table in ArcMap

Solution

步驟1:於TABLE表內新增一欄位(ADD FIELD)為「COUNT_1」,選擇TEXT格式

Step 1:Add the field name you want, and select the “text” type.

步驟2:於「COUNT_1」欄位,利用FIELD CALCULATOR重新填入需計算表格的內容

Step 2:Select the column you added, use the tool “field calculator” to reset the value.

How To: Add leading zeros to values in a field in an attribute table in ArcMap

步驟3:選取「COUNT_1」欄位,操作以下步驟

Step 3:Select the column you added,  and operator the following tips.

提示:依資料需求數值之位數,於括號內填入數值

Tip:Specify the desired number of digits in the brackets of .zfill().

How To: Add leading zeros to values in a field in an attribute table in ArcMap

How To: Add leading zeros to values in a field in an attribute table in ArcMap

References

How To: Add leading zeros to values in a field in an attribute table in ArcMap