Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2007
    Posts
    93

    Unanswered: add excel sheet on different excel sheet which is exported from access

    hello freinds !!

    i am exporting some tables from access to excell
    lets name the excelsheet as sheet1 which is exported from access

    now my concern is how u add another excelsheet to the same workbook exported from access

    any suggestions would be appreciated

    thanks
    sam

  2. #2
    Join Date
    Dec 2007
    Posts
    5
    In your 2nd Excel file, right click on the worksheet tab then select "move or copy". Choose the book where you want the worksheet to go and the order you want it to appear then click ok.

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    I imagine you are use exporttospreadsheet (or whatever that black magic is called) rather than automation. My advice would be "don't bother". Have a look here, see how you get on:
    http://www.dbforums.com/showpost.php...81&postcount=4

    HTH

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    BTW - I haven't looked at the code for a while. I am pretty certain it does what you want. If not you need to check out the Add method of the Worksheets collection - obvious eh?

  5. #5
    Join Date
    Nov 2007
    Posts
    93

    add another excel sheet

    thanks for the quick response !!

    guess u guys havnt understood .. so let me the things clear.. hehehe


    i am exporting from access to excel sheet on a button click.
    evry time i click on the button the new excel sheet is generated and i perform various excel automations on to the sheet. (its nt a issue) ...

    and my concern is i have to add a new worksheet to the workbook(excelsheet) generated each time on a button click.

    i have some thoughts like
    1. import everything into the access table but if i do tthat then i am loosing all the formating of the excel worksheet and when i export back to the new excel sheet then its without formating (which is useless).


    so guys i hope i have expressed it correctly this time atleast

    any ideas would be appreciated .. and i have no clue how to do the things from here.

    thanks in advance !!
    Sam

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi Sam

    Nope - I think I got it
    Quote Originally Posted by sam_01
    evry time i click on the button the new excel sheet is generated and i perform various excel automations on to the sheet. (its nt a issue) ...

    and my concern is i have to add a new worksheet to the workbook(excelsheet) generated each time on a button click.
    This seems contradictory - is the emboldened text supposed to be "Excel Workbook"?

    Anyway did you run the code? It adds worksheets to workbooks and poulates them with data then formats. Sounds like just what you asked for. Admittedly I did think you were using one of the evil DoCmd macros

  7. #7
    Join Date
    Nov 2007
    Posts
    93

    add excel sheet

    thanks for the reply !!

    but i dont want to import evrything into the access thn again export and do excel automation.. it suks thoug... its a lengthy procedure and also my excel sheet is constant it never changes so whats the use like importing into access and again exporting back to excel

    there shuld be some alternative to add the worksheet from access vba or vba code (like evrytime it takes that particular excel sheet from the specified dir:\)

    thats what i am looking for and if v are able to retrive that then would save nearly a tons of time..

    thanks
    if u guys have any idea then let me know please

    thanks

  8. #8
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Last time Sam - it does just that. Once more - have you looked at it?

    Who said anything about importing data from a spreadsheet into a database? Wash your mouth out - the very idea makes me shudder.<shudder />

Posting Permissions

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