+ Reply to Thread
Results 1 to 6 of 6

Make pivot from imported CSV

  1. #1
    Registered User
    Join Date
    03-08-2017
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    2013, 2016
    Posts
    42

    Make pivot from imported CSV

    Hello all,

    Is the following possible with standard Excel?
    I have a CSV file with data that is refreshed every night. In a separate excel file i would like to import the data and make a pivot table from it.

    The amount of rows in the csv file will change after each refresh (less or more rows). How to manage this?
    Can the data in the pivot be updated automatically or do i need to add a button to refresh?

    Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,210

    Re: Make pivot from imported CSV

    Yes it can be done, although probably using VBA, you automate the steps of importing csv, and refreshing pivot. This can either be done on a button or as part of opening the excel workbook

    Is the CSV file always the same name?

  3. #3
    Registered User
    Join Date
    03-08-2017
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    2013, 2016
    Posts
    42

    Re: Make pivot from imported CSV

    Quote Originally Posted by davsth View Post
    Yes it can be done, although probably using VBA, you automate the steps of importing csv, and refreshing pivot. This can either be done on a button or as part of opening the excel workbook

    Is the CSV file always the same name?
    Yes, the program will overwrite the existing csv with a new one.

    I will be able to create a button with a refresh macro, however it would be nice to make it refresh automatically when opened.
    Is it hard to accomplish this?

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: Make pivot from imported CSV

    As you are using the 2016 version of Excel you might consider using the Get & Transform feature as described in the linked Highline College video (24:15 mark). This part of the video is specifically talking about importing text files, however I believe that the method should work for CSV files.
    https://www.youtube.com/watch?v=ohGFPF12Qwc&t=1275s
    Best of luck.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Make pivot from imported CSV

    Yep, using PowerQuery to load data and perform any necessary transformation. Then load to data model.
    Then use the data model as source for your pivot table.

    If that's not an option (i.e. you need to make it compatible with older version)... you could use Pivot Wizard to create pivot table directly from text file.

    You can see small how-to I wrote in link below.
    https://chandoo.org/forum/threads/cr...2/#post-173495
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  6. #6
    Registered User
    Join Date
    03-08-2017
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    2013, 2016
    Posts
    42

    Re: Make pivot from imported CSV

    The pivot table wizard works fine for me. I already did some transformation in Qlikview, so i won't be needing to do that in Excel.
    Nice about the wizard is that it reloads the data when i open the file.

    Thank you all for your help and cooporation.

+ 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. Pivot table goes blank when new data imported
    By ejoneslor in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 01-13-2017, 06:05 AM
  2. Options to a pivot table from imported data
    By carmenpt in forum Excel General
    Replies: 2
    Last Post: 05-20-2015, 07:30 PM
  3. Make wordwrap work when data imported from seperate sheet
    By Marvlin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-14-2014, 02:04 PM
  4. Replies: 0
    Last Post: 03-08-2013, 06:34 AM
  5. Can Pivot Table Formulas be imported to a different file
    By Kimberly@TM in forum Excel General
    Replies: 3
    Last Post: 10-04-2010, 04:44 PM
  6. can't make a chart from data imported from txt file
    By bratek in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2006, 09:50 AM
  7. Replies: 2
    Last Post: 05-18-2006, 03:10 PM

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