Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Sep 2001
    Location
    Stuck at work..., Missouri, USA
    Posts
    248
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a directory full of spreadsheets that have 1 to many tabs in each of them.

    Each tab is identical in format, just the data is different.

    Anyone have any code that can open the spreadsheets and cycle through the tabs? I can easily do the import, but the tab thing has me stumped.

    Thanks!
    <font face="Comic Sans MS">Morgan Erickson</font face=comic>
    morgan.erickson@sprint.com
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>-From <img src=/S/flags/Colorado.gif border=0 alt=Colorado width=30 height=18> but living in <img src=/S/flags/Missouri.gif border=0 alt=Missouri width=30 height=18>...and working in Kansas.

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    Do all tabs have data in them, or do you need to check to see if a tab has data? I think probably Automation would be the best choice in trying to sort that out. For one thing you need to figure out how many tabs each workbook has. You will have to use the Excel object model to do both tasks, and the sheet property is exposed to automation.
    Wendell

  3. #3
    3 Star Lounger
    Join Date
    Sep 2001
    Location
    Stuck at work..., Missouri, USA
    Posts
    248
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by WendellB View Post
    Do all tabs have data in them, or do you need to check to see if a tab has data? I think probably Automation would be the best choice in trying to sort that out. For one thing you need to figure out how many tabs each workbook has. You will have to use the Excel object model to do both tasks, and the sheet property is exposed to automation.
    I believe all the tabs have data, but I can easily check to see if there is data in the cells.
    <font face="Comic Sans MS">Morgan Erickson</font face=comic>
    morgan.erickson@sprint.com
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>-From <img src=/S/flags/Colorado.gif border=0 alt=Colorado width=30 height=18> but living in <img src=/S/flags/Missouri.gif border=0 alt=Missouri width=30 height=18>...and working in Kansas.

  4. #4
    3 Star Lounger
    Join Date
    Sep 2001
    Location
    Stuck at work..., Missouri, USA
    Posts
    248
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by WendellB View Post
    Do all tabs have data in them, or do you need to check to see if a tab has data? I think probably Automation would be the best choice in trying to sort that out. For one thing you need to figure out how many tabs each workbook has. You will have to use the Excel object model to do both tasks, and the sheet property is exposed to automation.
    Thanks for the pointer....it helped me figure it all out!
    <font face="Comic Sans MS">Morgan Erickson</font face=comic>
    morgan.erickson@sprint.com
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>-From <img src=/S/flags/Colorado.gif border=0 alt=Colorado width=30 height=18> but living in <img src=/S/flags/Missouri.gif border=0 alt=Missouri width=30 height=18>...and working in Kansas.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •