algorithmic modeling for Rhino
I'm very basic beginner programming language. I'm trying to modify a component of VB.net for me to take all the rows and columns from Excel and I only managed to take one column at a time. Someone could help me?
Thank you.
RunScript Private Sub (ByVal Column As Integer, ByVal StartRow As Integer, ByVal Count As Integer, ByVal _Stream As Boolean, ByRef A As Object)
If _Stream = True Then
Dim As System.Globalization.CultureInfo = system.Threading.Thread.CurrentThread.CurrentCulture oldCI
= New System.Globalization.CultureInfo System.Threading.Thread.CurrentThread.CurrentCulture ("en-US")
Dim objExcel As Object
System.Runtime.InteropServices.Marshal.GetActiveObject objExcel = ("Excel.Application")
ArrStr Dim list As New (Of String)
Dim i As Integer
i = 0
do
If count /span>1 Then
If Not IsNothing (objExcel.Cells (CInt (StartRow + i), CInt (Column)). Value) Then
arrStr.add (objExcel.Cells (CInt (StartRow + i), CInt (Column)). Value)
else
Exit Do
End If
else
If i <count Then
arrStr.add (objExcel.Cells (CInt (StartRow + i), CInt (Column)). Value)
else
Exit Do
End If
End If
i = i + 1
Loop
A = arrStr
End If
Tags:
Welcome to
Grasshopper
© 2024 Created by Scott Davidson. Powered by