+ Reply to Thread
Results 1 to 5 of 5

Cant save workbook....

  1. #1
    Registered User
    Join Date
    06-28-2010
    Location
    Ottawa
    MS-Off Ver
    Excel 2003
    Posts
    9

    Cant save workbook....

    I have been having trouble trying to save a workbook with a numbe of sheets. My program works by working with an array (like a workbook) of 2D object arrays (analogous to worksheets), instead of working directly with Excel Interop. Once the program is done doing its thing, it copies the arrays to the Excel worksheets like this:

    Please Login or Register  to view this content.
    The odd thing is that the first sheet saves correctly, but the rest dont save at all...

    Does anybody have any ideas???

    Rich

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Cant save workbook....

    Hello rich_drummer,

    Have you checked the value of sheet.length? It must be 5, if only 5 sheets are copied.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    06-28-2010
    Location
    Ottawa
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Cant save workbook....

    Oops, i made a mistake, the code should look like this:

    Please Login or Register  to view this content.
    And, in this case the sheetArray is 12 long and I have confirmed that the workbook contains 12 as well.

  4. #4
    Registered User
    Join Date
    06-28-2010
    Location
    Ottawa
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Cant save workbook....

    Bump (no response)

  5. #5
    Registered User
    Join Date
    06-28-2010
    Location
    Ottawa
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Cant save workbook....

    By the way, sheets is indexed at 1, not 0. SheetArray is an instance of a class I built that contains an array of sheets in the form of a 2D array. I hope this is not all too confusing... Perhaps I need to be more specific.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1