I'm trying to import multiple xlsx files (identical structure) according to this tutorial which is referenced in so many posts here: contextures.com/PowerPivot-Identical-Excel-Files.html
It works beautifully for 2 files but the moment I add a 2nd UNION ALL statement I get a "No column detected" error.
This works:
SELECT ['mychoice-final-b9BwZvd@month da$'].* FROM ['mychoice-final-b9BwZvd@month da$']
UNION ALL
SELECT * FROM `D:\mark.xlsx`.[mark$]
This works:
SELECT ['mychoice-final-b9BwZvd@month da$'].* FROM ['mychoice-final-b9BwZvd@month da$']
UNION ALL
SELECT * FROM `D:\john.xlsx`.[john$]
This doesn't:
SELECT ['mychoice-final-b9BwZvd@month da$'].* FROM ['mychoice-final-b9BwZvd@month da$']
UNION ALL
SELECT * FROM `D:\mark.xlsx`.[mark$]
UNION ALL
SELECT * FROM `D:\john.xlsx`.[john$]
It's driving me crazy! I just don't understand why it doesn't work. I've looked up UNION ALL syntax and read every single post I could find, I've triple checked the table names too, the structure is identical. The latter results in a "no column detected". Can anyone help?
UPDATE:
I think the problem is the number of columns in my Excel files (I have 124 columns). I have deleted them (different types, numerical and digits) and it seems that once my document has more than 85 columns I get the above error. I tried it with the EastCoast sample files in the tutorial. If the document has 85 columns or less I can add as many files using UNION ALL. If it's over 85 columns it hits a brick wall!
Has anyone encountered this problem? Can anyone offer a workaround?
It works beautifully for 2 files but the moment I add a 2nd UNION ALL statement I get a "No column detected" error.
This works:
SELECT ['mychoice-final-b9BwZvd@month da$'].* FROM ['mychoice-final-b9BwZvd@month da$']
UNION ALL
SELECT * FROM `D:\mark.xlsx`.[mark$]
This works:
SELECT ['mychoice-final-b9BwZvd@month da$'].* FROM ['mychoice-final-b9BwZvd@month da$']
UNION ALL
SELECT * FROM `D:\john.xlsx`.[john$]
This doesn't:
SELECT ['mychoice-final-b9BwZvd@month da$'].* FROM ['mychoice-final-b9BwZvd@month da$']
UNION ALL
SELECT * FROM `D:\mark.xlsx`.[mark$]
UNION ALL
SELECT * FROM `D:\john.xlsx`.[john$]
It's driving me crazy! I just don't understand why it doesn't work. I've looked up UNION ALL syntax and read every single post I could find, I've triple checked the table names too, the structure is identical. The latter results in a "no column detected". Can anyone help?
UPDATE:
I think the problem is the number of columns in my Excel files (I have 124 columns). I have deleted them (different types, numerical and digits) and it seems that once my document has more than 85 columns I get the above error. I tried it with the EastCoast sample files in the tutorial. If the document has 85 columns or less I can add as many files using UNION ALL. If it's over 85 columns it hits a brick wall!
Has anyone encountered this problem? Can anyone offer a workaround?
Last edited: