Bonjour cette fonction m'apparait d'Etre bien longue comparer a ce quelle fait:
Friend Function ConvertToStringArray(ByVal values As System.Array) As String()
Dim theArray As String() = New String(values.Length - 1) {}
Dim i As Integer = 1
Do While i <= values.Length
If values.GetValue(1, i) Is Nothing Then
theArray(i - 1) = ""
Else
theArray(i - 1) = CStr(values.GetValue(1, i).ToString())
End If
i += 1
Loop
Return theArray
End Function
je l'utilise dans mon programme comme ceci:
Dim theArray As String() = modExcel.ConvertToStringArray(CType(range.Cells.Value, System.Array))
JE crois qu'il doit y avoir un meilleur moyen de faire ouquelque chose de déja fait pour cela......
QU'aez-vous à me proposer?