Split data

Dear All,

I need split data to two columns with input as below.

Please help me to solve it.

‘Text Split’ will return nine branches of two items each. ‘Flip Matrix’ will convert that data tree into two branches of nine items each, corresponding to your two columns. I have no idea how you want to present them as two actual columns in Grasshopper/Rhino?

Posting code that contains nothing more than the panel in your image would be WAY BETTER that the image alone. Instead of the text explanation above, I would have replied with working code.

1 Like

Please see my excel and grasshopper file

<a class=“attachment”

test.rar (19.7 KB)

Nha pho 6x14_V13.rar (81.9 KB)

Thanks you so much

I can’t handle ‘.rar’ files.

Please check file attachment

I using LunchBox Component


There is no attachment. I don’t want an Excel file either. I don’t want to install LunchBox to get an Excel file reader. From the second image you posted, this is about much more than splitting a list of numbers. I don’t know what to say anymore… Time to take a long break from the Grasshopper forum I guess.

See this:

1 Like


Please check my file attachments

test.rar (19.7 KB)

Nha pho 6x14_V13.rar (81.9 KB)

LunchBox extension can download here

Hi @duchoabn, the problem is not that it’s impossible to install a plug-in like Lunchbox, but rather that it’s a lot of work that seems irrelevant considering the scope of the question.

Your original question only mentioned converting a collection of text in the form “A; B” into two lists of numbers (one with all the A’s, the other with all the B’s). This involves neither LunchBox nor Excel, it’s just vanilla Grasshopper.

@Joseph_Oster’s answer is basically correct, you need to use Text Split and then Flip Matrix to achieve what you want. Is that not the correct answer? If so, can you rephrase the question?

1 Like

HI David,

I using LunchBox for read excel only.

below the picture can explain my issue


If you insert Text parameters between your ExcelRead components and your Panels, then internalize the data in those text parameters you can remove everything to the left of them, making your file way simpler to deal with. Careful! Do not save and overwrite your actual file after you remove those objects.

This will allow us all to deal with your data without the need to install plugins, install Excel and or download xls files.

It is not possible to name objects in Grasshopper. You can draw text in the viewports at a specific location, but geometry in Grasshopper doesn’t have layers, or names, or colours, or other attributes associated with it.

Furthermore I do not understand how two numbers can encode both the start and the end of a line segment. 71; 78 could be interpreted to mean an (x,y) coordinate, but for a line you need two coordinates. What am I missing?

1 Like

Ah I think I got it. The 77; 78 refer to the index of the points in the first panel, right?

1 Like

If you had posted a simple GH file in the first place, uncompressed with RAR, with your list of points internalized, you would have your answer by now. No need for an Excel file or LunchBox plugin to read it or a RAR utility to open your files.

1 Like

Hi David
It oke, I want create line from data with point coordinates, and point name. I think probably using script?

See if the attached helps. Instead of creating lines I use the Polyline component, it means you do not have to flip your data matrix.

data parsing.gh (24.6 KB)

1 Like

Hi David

Points not random, need create from order (point start,point end) and point coordinate data, point name

With only two points in each branch, ‘Line’ should give the same results as ‘PLine’? But it doesn’t:

Don’t know why yet…? Oh… right - this gets the same result:

Befuddled by the chaos.