回答編集履歴

1

修正

2021/02/05 02:15

投稿

退会済みユーザー
test CHANGED
@@ -6,11 +6,11 @@
6
6
 
7
7
  For Each row As DataRow In table0.Rows
8
8
 
9
- For colIndex = 1 To table0.Columns.Count - 1
9
+ For Each col As DataColumn In table0.Columns
10
10
 
11
- If IsDBNull(row(colIndex)) Then
11
+ If col.DataType = GetType(Decimal) AndAlso IsDBNull(row(col.Ordinal)) Then
12
12
 
13
- row(colIndex) = 0
13
+ row(col.Ordinal) = 0
14
14
 
15
15
  End If
16
16