PDA

View Full Version : First column missing in query results



rk415
2017-04-13, 08:29 PM
For some reason, the column header is pulling through (Location), yet none of the actual data is.

Some background, the query is pulling data from a folder of files. I'm also calling a function where I'm cleaning up the files a little as well as assessing all of the column headers (as the headers are not consistent from file to file).

Hope this makes sense, and forgive me if I'm missing any critical parts...it's my first time posting to a forum like this.

Thanks!

Robin

Logit
2017-04-13, 08:44 PM
Perhaps I'm missing something but non of the workbooks has any code or formulas. How are you copying the data over to the main workbook.

rk415
2017-04-14, 01:10 AM
Hmmm....maybe i'm misunderstanding, but all of the queries show up on my end when I click Show Queries. Or do you mean something else?

Logit
2017-04-14, 02:31 AM
Are the correct workbooks posted in your original posting ?

What do you mean by Show Queries ? I'm running Excel 2007 .. perhaps you have a newer version with an added feature ? Or (more probable) this is
a part of Excel that I am completely unfamiliar with. What a day ! :doh:

Ken Puls
2017-04-14, 05:21 AM
@Logit, Power Query doesn't exist in Excel 2007. Anything in this subforum (sadly) will be dead to you until you upgrade. (I wish that wasn't the case, as you're missing out on about 20 years of evolution here.)

@rk415, per the email thread we've been involved in:


... it appears that you completely remove the Column1 and Column2, and it appears that Column2 is the one that has the info for the Location and thatís why youíre not seeing the Location appear in the output. What you can do is change the function so it doesnít remove the Column2 and that way youíll keep the Location. Iím sending you a suggestion that should work. One thing to mention is that finding out the name of the columns in multiple files, where those fields can have more than 10 columns, can be an expensive query and slow down your overall experience. If you hardcode the fields that you want, then itíll take less time to load, but if a field is not hardcoded then it wont appear on your final output table. I also changed the input that you had on your function as it was also adding an overhead to the query as a filepath function is not something that we encourage people to do when they already connect to a folder.

Logit
2017-04-14, 03:19 PM
My fault. I didn't review the section heading for this Thread. My apologies.