Import coordinates from an excel file

Hi,
I have created some points in Python that I would like to import in Grasshopper. The excel file has 3 columns that represent the x,y,z of each point. How can I import these coordinates in order to display the points (in the order that are displayed in the excel file)?

Thanks

If you are using a Windows version of Rhino / GH, you can save the excel as csv and open it with the Params > Input > Read File component.

Thanks! I manage to import it, but when I construct my points I don’t know why, it changes the value of my coordinates x,y,z.
As you can see in the image the value that I insert in the x component in the constructing point is different from the x that the point display.

I’m not sure if it was around in Rhino 5, but in Rhino 6 you could probably use the Params->Input->Import Coordinates component.

as long as x, y, z are in separate columns…you also can define the delimiter, (if it’s not a comma).

Your coordinates decimals should be defined as a period, not a comma. The Vector > Point > Construct Point component is getting confused.

The data in my csv is like this:

10,10,10
20.44,55.01,75
33,44,55
11,22,33
556,67,89
12,13,14
15,16,17
89,67,45
100,24,25
15,16,19

Coordinates are separated by commas , and numbers use a period . for decimals.

Attached is the definition and csv. You’ll need to re-reference the csv file.
pointsfromcsv.gh (7.4 KB)
points.csv.zip (233 Bytes) (sorry, had to zip it since the csv extension isn’t allowed for upload…unzip before using)

As @chanley points out (no pun intended), there is also the Params > Input > Import Points component available in R5 and R6 which does the same, but gives you a bit more flexibility in how you define the points file.

1 Like