Results 1 to 17 of 17

Thread: Copy and Export to CSV of Pivot Table output results

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #13
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,970
    The attached has a button. Pay attention to the button's caption.
    This solution is clunky; I'm experimenting with various approaches and was aware that you needed some sort of response sooner rather then later.
    It's slow and I'm sure I can speed it up (later) to just a few seconds.

    What this offering does:
    Creates a pivot table in the same workbook as the button. This pivot table is used to create file names (the Kit No and the most popular Device according to no. of tries).
    It runs down the pivot table picking up Kit Nos and for each, uses MS Query to create a temporary sheet, then a workbook, which is saved as a .csv file in a subfolder called CSVFiles under the foder containing the source xlsx file, and closed. If there is already a file with the same name, it asks if you want to overwrite it. You can prevent this question popping up by deleteing all .csv files in that subfolder before running the macro.
    Note that the resultant csv files may contain records for Sequence IDs for more than the Device mentioned in the csv file's name; there is no Device name data within the csv files.
    The Pivot table sheet is then deleted.

    There are comments within the code too.
    Attached Files Attached Files
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Tags for this Thread

Posting Permissions

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