SU to Excel
-
Win32ole not this ...
-
Use WIN32OLE and create the sheet directly from Ruby under SketchUp.
Todd
(edit 8/1/2008 - fix typo from winole to win32ole)
-
Go here http://phrogz.net/ProgrammingRuby/frameset.html and click on "Ruby and Microsoft Windows" and you can read how to do it, with working examples.
(Sorry about the initial typo - I fixed it. Thanks Chris)
Todd
-
This looks really cool! Thanks Todd. I found the doco for the win32ole class, but I haven't been able to locate the details of the windows classes, like the excel class. I'm sure this is obvious, but it's new territory for me. Thanks again. CB.
-
Also, is the win32ole stuff built into the ruby that comes with SU, or do I need to download a library of some sort?
-
here are the best two links you might need -
http://homepage1.nifty.com/markey/ruby/win32ole/index_e.html
http://wiki.rubygarden.org/Ruby/page/show/ScriptingExcel- place "win32ole.so" in your plugins folder
- start slowly and experiment, if you get into problems design a minimal test case for that specific problem !
Moris
-
Thanks, Moris. I'm sorry, but I'm feeleing really dense, here. Where do I get the win32ole.so file? It's not in the win32ole-0.5.2.zip file in the link you posted. The excel scripting looks pretty straightforward, and exactly what I'm looking for.
-
Nevermind - I found it on Didier's site. Thanks everyone.
-
win32ole.so comes with the full ruby download. Since you are a developer, I would suggest you download the full ruby install from http://www.ruby-lang.org. If you are on Windows, the one-click installer works great. Then, you will have win32ole and lots of other goodies, and the ability to leverage ruby for yourself outside of SketchUp.
It's ok the full ruby install is a different version than the one that comes with SketchUp - never the two shall meet. Go with a 1.8.x download of Ruby, unless you want to be cutting edge with 1.9.
Todd
-
In sketchup,If can copy text of outliner dialog Box to EXCEL,It's very nice!
-
Thanks for all the help, guys. I'm off and runing now. And I have to say, it's a pretty cool trick - the excel window opens and stuff starts appearing in the cells like magic! CB.
Advertisement