El Cid
Member
- Joined
- Aug 22, 2016
- Messages
- 52
- Reaction score
- 0
- Points
- 6
- Location
- Greenville, SC
- Excel Version(s)
- Excel 2016
Here's the code:
= Csv.Document(File.Contents("U:\A-FINSTATS\2016\20160630\WIP\Contract Jobs P&L.CSV"),[Delimiter=",", Columns=228, Encoding=1252, QuoteStyle=QuoteStyle.None])
Problem is the file actually had 338 columns. Of course i can hand edit the parameter and run the query again, but that's not what I want to do because it means I have to open the CSV file in Excel and count the number of columns with data in them. Is there a way to make PQ look at the file and dynamically change the "Columns=" parameter?
Thanks.
= Csv.Document(File.Contents("U:\A-FINSTATS\2016\20160630\WIP\Contract Jobs P&L.CSV"),[Delimiter=",", Columns=228, Encoding=1252, QuoteStyle=QuoteStyle.None])
Problem is the file actually had 338 columns. Of course i can hand edit the parameter and run the query again, but that's not what I want to do because it means I have to open the CSV file in Excel and count the number of columns with data in them. Is there a way to make PQ look at the file and dynamically change the "Columns=" parameter?
Thanks.