VB.NET如何将Object(,)转换为String()

问题描述 投票:0回答:1

我目前可以从每个EPPlus接口的excel获取数据。我的Excel是一个csv文件。

我已经在[[object(,)属性中获得了数据(对我来说是未知格式)。

是哪种格式?如何将其转换为字符串数组?
arrays vb.net object type-conversion epplus
1个回答
0
投票
如果您的意思是这样...

Private Class TestIt Dim strvar1 As String = Nothing Dim strvar2 As String = Nothing Dim Split As Object = MyFunc("A") strvar1 = Split(0) strvar2 = Split(1) End Class Public Function MyFunc(Test As String) As Object Dim var1 As String = Nothing Dim var2 As String = Nothing Select Case (Test) Case "A" var1 = "one" var2 = "two" Case "B" var = "three" var2 = "four" End Select Return {var, var2} End Function

© www.soinside.com 2019 - 2024. All rights reserved.