• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Question about working with .CSV files|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / Question about working with .CSV files|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…Question about working with .CSV fi…
sp_PrintTopic sp_TopicIcon
Question about working with .CSV files
Avatar
Frans Visser
Duivendrecht (near Amsterdam) - The Netherlands

VIP
Members
Level 2
Forum Posts: 346
Member Since:
April 21, 2015
sp_UserOfflineSmall Offline
1
November 25, 2019 - 1:12 am
sp_Permalink sp_Print

I think this a strange behaviour of Excel, but maybe it can be solved easily?

I export the weekly information from a bankaccount as a .csv file.

I made a kind of dashboard to see 2017, 2018 and 2019 so far. Because the bankprogram can't export that in one file, I exported it in the files 2017.csv, 2018.csv and 2019.csv. And with PowerQuery I imported the csv information and made my dashboard. All is working fine.

I thought it would be possible to only export the new weeks to a separate .csv file, open the 2019.csv file and that new .csv file and then copy this new lines to the 2019 file, save again as 2019.csv.

BUT when I then open my Excelfile with the dashboard, the PowerQuery says something like 'Can't find' (and then the name of the first column header). Of course it is there, but apparently Excel had changed something in the file when opening and saving it.

I tried to repair this with adding the double quotes it needs, but that doesn't work.

My new method is exporting the whole year from the bankprogram and replace that one as the 2019.csv file. That's working good (of course, because I don't open the .csv and don't save it), but not so nice because I have to adjust things in the bankprogram everytime, which works not so fine.

Any ideas how this issue can happen in Excel and how to solve it?

thanks!

Frans

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4447
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
November 25, 2019 - 8:55 am
sp_Permalink sp_Print

Hi Frans,

Why don't you use 'Files from Folder' to get the data with Power Query. That way you just add your new 2019 file with the new lines to the folder and Power Query gets all of the files. You don't need to open the csv files in Excel and do anything to them, just grab all of the files in the folder.

Perhaps I've misunderstood?

Mynda

Avatar
Frans Visser
Duivendrecht (near Amsterdam) - The Netherlands

VIP
Members
Level 2
Forum Posts: 346
Member Since:
April 21, 2015
sp_UserOfflineSmall Offline
3
November 26, 2019 - 6:29 am
sp_Permalink sp_Print sp_EditHistory

Thanks for answering and this idea Mynda. I didn't thought about that solution, maybe because I don't work often with the Power of Power Query.

New question: I think I must make a folder where I only put the exports from the bankprogram, isn't it? So it can't be mixed up with other files and data it doesn't understand. And do I understand it clearly that the data of every (for instance weekly) file is 'automatically' added to the query?

Frans 

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4447
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
November 26, 2019 - 8:24 am
sp_Permalink sp_Print

Yes, it's ideal if you have a folder that only contains the files you want to get, that way you don't need to worry about filtering the file names upon import and having to update those filters each time new files are added to the folder. Instead you just allow the query to get everything.

If you must put files in the folder that you don't want to import in the query then you should use a consistent naming convention that allows you to filter on 'text that contains' and all csv files you want to import contain that text and the files you don't want to import don't contain it. Hope that makes sense.

Avatar
Frans Visser
Duivendrecht (near Amsterdam) - The Netherlands

VIP
Members
Level 2
Forum Posts: 346
Member Since:
April 21, 2015
sp_UserOfflineSmall Offline
5
November 30, 2019 - 7:20 am
sp_Permalink sp_Print

OK we are some days further in time now, so I had the change to test everything proparly.

I made this new file and put the data in a folder that's in the same folder as the new file (so the data is not in the same folder as my report file).

This works perfect indeed! New export from the bankprogram is placed in that data folder, you refresh the query and also the pivot table (can that be done automatically?) and everything works. Only thing is to check the bankprogram because the export there sometimes gives a date which I already imported and of course you get 'double values' then.

Problem solved! (ah well to say it correctly: found a better working solution).

Frans

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4447
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
6
November 30, 2019 - 8:32 am
sp_Permalink sp_Print

Glad you got it working! You could always apply a filter to remove duplicate rows, but you'd want to be certain that a duplicate could never exist!

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: s Ramchandran, Stacy Culpepper
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Forum Stats:
Groups: 3
Forums: 24
Topics: 6210
Posts: 27236

 

Member Stats:
Guest Posters: 49
Members: 31888
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.