Grasshopper

generative modeling for Rhino

Who knows how to Read and Write *.txt or *.xls files in Grasshopper?
It will be great help for me to link with other database.
Since there are lot of software which can do data analysis more easily.
Thank you~

Tags: database, external, file, input, output, read, txt, write, xls

Views: 176

Reply to This

Replies to This Discussion

You can try in VB code with System.IO.File, like this:

system.IO.File.WriteAllText("c:\text.txt", "text")

This code write word text in file text.txt on disk c.
This is from a while back, but you can correct directly to excel from within GH. I'm not sure the extent to which you could read xls files without running excel.

http://liquidtectonics.blogspot.com/search/label/Excel

Reading in a csv file wouldn't really be much different in GH than parsing it within dotNet, so all of the dotNet classes you would use would be the same.
With the newer version of GH (I'm using 0.8.0004), streaming data with the yellow text box is easy. I write tabular data to a csv by concancate then strings with commas.

RSS

Translate

Search Grasshopper

Members

  • Vladimir
  • jorudan
  • Paul Sohi
  • Ivan Kiryakov
  • Marco Caprani
  • Sameer Kumar
  • Hannes Löschke
  • Peter Kluck
  • Igor
  • Agnes Tan
  • Pieter Segeren
  • David Rutten

Photos

  • Add Photos
  • View All

© 2012   Created by Scott Davidson.   Powered by .

Badges  |  Report an Issue  |  Terms of Service