+ Reply to Thread
Results 1 to 6 of 6

Exporting Multiple Worksheets as CSV

  1. #1
    Forum Contributor
    Join Date
    08-23-2013
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 365
    Posts
    166

    Exporting Multiple Worksheets as CSV

    So I am using this code to export as PDF to a certain location for a bunch of worksheets. Am I able to use this same sort of line, but to export as csv? How would I do so?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Exporting Multiple Worksheets as CSV

    Something like this perhaps?

    Please Login or Register  to view this content.
    Alf

  3. #3
    Forum Contributor
    Join Date
    08-23-2013
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 365
    Posts
    166

    Re: Exporting Multiple Worksheets as CSV

    Wow that was quick. Works great.
    How do I get this to name the csv the same as it's worksheet name?

    Thanks again,

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Exporting Multiple Worksheets as CSV

    Replace "Book" with Sheets(i).Name i.e.

    Please Login or Register  to view this content.
    If this solves your problem don't forget to mark you thread "Solved"

    Alf

    To mark your thread solved do the following:
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

  5. #5
    Forum Contributor
    Join Date
    08-23-2013
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 365
    Posts
    166

    Re: Exporting Multiple Worksheets as CSV

    It's sending the CSV's named sheet1, sheet2, sheet3.
    How can I have this export the sheet name or where do I list the sheet name in the code?

    Thanks,

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Exporting Multiple Worksheets as CSV

    This should do it then

    Please Login or Register  to view this content.
    Alf
    Last edited by Alf; 04-09-2015 at 03:00 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Exporting Data in 2 Cells from multiple worksheets into new worksheet
    By mickwooduclan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-12-2012, 06:34 AM
  2. Exporting Worksheets
    By Chatbot in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-12-2011, 07:13 AM
  3. Exporting (printing) multiple worksheets as a single pdf file
    By Dano in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-16-2008, 01:24 PM
  4. Exporting values from many worksheets
    By dreamkeeper in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-30-2006, 06:50 PM
  5. Exporting data from ms-access database to multiple worksheets using ASP
    By sridevi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-11-2005, 07:06 AM

Tags for this Thread

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