• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

SU to Excel

Scheduled Pinned Locked Moved Developers' Forum
14 Posts 5 Posters 1.6k Views 5 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    daiku
    last edited by 31 Jul 2008, 12:55

    I'm looking for the opposite functionality of the other Excel discussion thread now running. My script currently exports a material list as a .csv file, which excel can read. But I'd really like to generate an actual .xls file, because I'd like to include some cells with formulas. Any ideas? CB.

    Clark Bremer
    http://www.northernlightstimberframing.com

    1 Reply Last reply Reply Quote 0
    • C Offline
      chrisglasier
      last edited by 31 Jul 2008, 13:59

      Help to develop namesets then you can do anything without relying on any proprietary products ... (Any formula in Excel can be done in Javascript)

      Chris

      With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

      1 Reply Last reply Reply Quote 0
      • D Offline
        daiku
        last edited by 31 Jul 2008, 17:14

        @unknownuser said:

        Use WINOLE and create the sheet directly from Ruby under SketchUp.

        Todd

        Todd:

        Do you have any more details, or example code? CB.

        Clark Bremer
        http://www.northernlightstimberframing.com

        1 Reply Last reply Reply Quote 0
        • C Offline
          chrisglasier
          last edited by 1 Aug 2008, 02:01

          Win32ole not this ...


          winole.jpg

          With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

          1 Reply Last reply Reply Quote 0
          • T Offline
            todd burch
            last edited by 1 Aug 2008, 12:22

            Use WIN32OLE and create the sheet directly from Ruby under SketchUp.

            Todd

            (edit 8/1/2008 - fix typo from winole to win32ole)

            1 Reply Last reply Reply Quote 0
            • T Offline
              todd burch
              last edited by 1 Aug 2008, 12:27

              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

              1 Reply Last reply Reply Quote 0
              • D Offline
                daiku
                last edited by 1 Aug 2008, 13:34

                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.

                Clark Bremer
                http://www.northernlightstimberframing.com

                1 Reply Last reply Reply Quote 0
                • D Offline
                  daiku
                  last edited by 1 Aug 2008, 13:42

                  Also, is the win32ole stuff built into the ruby that comes with SU, or do I need to download a library of some sort?

                  Clark Bremer
                  http://www.northernlightstimberframing.com

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    morisdov
                    last edited by 1 Aug 2008, 15:23

                    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

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      daiku
                      last edited by 1 Aug 2008, 15:45

                      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.

                      Clark Bremer
                      http://www.northernlightstimberframing.com

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        daiku
                        last edited by 1 Aug 2008, 16:30

                        Nevermind - I found it on Didier's site. Thanks everyone.

                        Clark Bremer
                        http://www.northernlightstimberframing.com

                        1 Reply Last reply Reply Quote 0
                        • T Offline
                          todd burch
                          last edited by 3 Aug 2008, 02:14

                          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

                          1 Reply Last reply Reply Quote 0
                          • Z Offline
                            ZFRPS
                            last edited by 4 Aug 2008, 03:41

                            In sketchup,If can copy text of outliner dialog Box to EXCEL,It's very nice!

                            sketchup is bim

                            1 Reply Last reply Reply Quote 0
                            • D Offline
                              daiku
                              last edited by 4 Aug 2008, 12:53

                              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.

                              Clark Bremer
                              http://www.northernlightstimberframing.com

                              1 Reply Last reply Reply Quote 0
                              • 1 / 1
                              1 / 1
                              • First post
                                1/14
                                Last post
                              Buy SketchPlus
                              Buy SUbD
                              Buy WrapR
                              Buy eBook
                              Buy Modelur
                              Buy Vertex Tools
                              Buy SketchCuisine
                              Buy FormFonts

                              Advertisement