embedding excel sheet

Discussion in 'SolidWorks' started by Mark, Nov 28, 2007.

  1. Mark

    Mark Guest

    Hi all -

    I'm trying to write a macro that will let me edit properties on a
    bunch of files at once, using an Excel table.
    Is there a way to use an embedded Excel sheet, a la design tables,
    instead of launching Excel as a separate app and having to work around
    a way to trigger data retrieval by SW?
    I have all the other code - select a folder, step through the files of
    the selected type gathering their properties and drop it all into a
    worksheet. Now I just need the right way to access Excel. I've got a
    workaround in mind (use a dedicated workbook for this purpose, clear
    it out every time, and add a button to my form triggering retrieval)
    but I'm hoping for something more direct.

    Thanks in advance,
    -Mark

    [x-posted to SolidMentor]
     
    Mark, Nov 28, 2007
    #1
  2. Mark

    jeppe Guest

    I would think twice before embedding Excel worksheet in a SW document.
    Too many problems with Excel-SolidWorks integration.
    Best regards
     
    jeppe, Dec 6, 2007
    #2
  3. Mark

    Mark Guest

    What I was hoping to do wasn't really embedding a worksheet, per se -
    I just wanted to launch an excel sheet that a) wasn't necessarily in a
    separate Excel window and b) included the "close and return to
    solidworks" option.
    Instead I wound up using the workaround I mentioned previously - SW
    sends all the property info to a master worksheet, which contains a
    macro to exports the property values back to SW; it operates without
    saving so that the excel file can be read-only (no leftover values
    messing with future runs). The nice thing about this option is that
    if I choose, I can save the excel sheet elsewhere - for instance,
    yesterday somebody else had checked out the files I needed to modify,
    so I just saved the worksheet, and when she checks the files back in I
    can launch the macro and update all the properties.

    -Mark

     
    Mark, Dec 6, 2007
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.