Grasshopper

algorithmic modeling for Rhino

A gha component example: excel static read and interactive read

Hi group,

I recently started to develop gha component(also using Visual Studio), this is my first version of Excel read component. I know many people has done this before, but I think it is still a good topic to start with.

 

There are two components: static read and dynamic read. The difference is the dynamic one could monitor excel change and reflect in the output immediately. Both component can read rows or columns or entire sheet, the result can also organized by  rows or columns accordingly. I attached a simple manual for  details.

 

I attached the Visual studio file, you can tell the structure is messy(first time use VS to to do real stuff), luckily it works eventually. 

 

I have to say if I also "eat bugs for breakfast" then this simple breakfast takes a bit long...

 

Any suggestions please let me know.

Views: 6405

Attachments:

Replies to This Discussion

Hello xiaming,
You do not say what version of excel it be false. With a *. xlsx its not working.

Reading dynamic works well, for cons if you remove one or more lines excel then your program starts Bug. The read-only file is amazing.

The memory in this case is not optimized, ie it line by line do something like that.

Otherwise great work, and share files VS's priceless ....

Thank you very much for your reply and your time testing the component.

 

>You do not say what version of excel it be false. With a *. xlsx its not working.

I have to admit I only test the component on my desktop using Window 7 and office 2007. In this case it works well with xlsx file. Could you explain more about your testing conditions?

 

>for cons if you remove one or more lines excel then your program starts Bug.

Do you mean if one row or column in Excel been removed, the component has error? I have try that on my system and I do not have error. Can you explain your detailed steps when you see the error?

 

>The memory in this case is not optimized, ie it line by line do something like that.

It is true memory is not optimized and to be frank I don't know how to do that.  Could you explain more on your suggestion?

 

Thank you!

Hello there, In fact there aun little problems in my test yesterday.
If a definition is placed in two components with your "true" then one of the excel file is opened in read-only.
I think it wrong to ensure that the file is closed before running your program.

If not for the deletion, I have not managed to repeat the mistake once I understood the process components.
However on large files, memory goes up fast enough ...

Great job, I wonder if "all" can be replaced by a values ​​column by column to read the file??

>However on large files, memory goes up fast enough ...

I also realized that, I think it will take some to learn and improve the code


>I wonder if "all" can be replaced by a values ​​column by column to read the file??

Sure, actually input could be a list of strings, for example:

A1:A20

B15:B50

It will read the columns and put each into a list. Rows also works such as a12:f12

But it does not accept a range such as a12:b24

Hope this is helpful.

Please it's possible upadte compoment on GH 0.9 ?

Thanks for all....

Yes, working on it and fix a few bugs as well. This might take a while, haven't tough it for sometime...

Hi everyone,

Just some updates of the excelReadWrite components. I just recompiled it with Grasshopper 0.9 and update some of the demo files. Also tried to fix the language bug in the previous version. Please let me know if anything strange happens.

Hello Xiaoming,
First it's acces denied for download ExcalReadXrite.rar

It's impossible to donwlod an attachment

Thanks

No idea what happen. Let me try it again.

Attachments:

It's ok for the download.
I'm testing and return to you..

hey xiaoming !

so far working brilliantly with excel 2010 

just a question?

what about the non numeric values? like string? or time and date?

i'm getting a weird number instead of a number representing time like 20:20:40 (8:20pm and 40 seconds)

same for the date which in excel appears like so: 21/08/2012

thoughts?

hello xiaming

i can't open the (excel read.zip) 

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service