Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
When a text file start by PK. The options do not displayed. I don't figure why.
Detail :
Case 1 file start with "PK" Don't work
My file :
Loading in power BI Throught Get Data -> Txt file/csv
There is a problem because it does not display any options.
Case 2 file start by "P" Work
My file :
Loading in power BI Throught Get Data -> Txt file/csv:
In that case, no problem and the option menu is displayed.
Solved! Go to Solution.
PK is the beginning of a zip file (xlsx files are actually zip files), which you can check in section 4.2 of the .ZIP File Format Specification.
Why does Power Query do this? I guess it's to prevent some people from accidentally changing .xlsx files to .csv files. In fact, if you change the suffix of the .xlsx file to the suffix of the .csv file (change ".xlsx" to ".csv"), Excel can still open it correctly.
Back to the real world, only regions that only use English letters have a small chance of encountering this problem (so, I guess Microsoft will not fix it), because the beginning of "PK" in many regions (such as Chinese and Russian) uses multi-byte characters, and it is difficult to encounter "PK".
Solution to the problem: manually write the expression to import csv/txt files, or do not use ANSI encoding (I reproduced your problem using code page windows-1250).
PK is the beginning of a zip file (xlsx files are actually zip files), which you can check in section 4.2 of the .ZIP File Format Specification.
Why does Power Query do this? I guess it's to prevent some people from accidentally changing .xlsx files to .csv files. In fact, if you change the suffix of the .xlsx file to the suffix of the .csv file (change ".xlsx" to ".csv"), Excel can still open it correctly.
Back to the real world, only regions that only use English letters have a small chance of encountering this problem (so, I guess Microsoft will not fix it), because the beginning of "PK" in many regions (such as Chinese and Russian) uses multi-byte characters, and it is difficult to encounter "PK".
Solution to the problem: manually write the expression to import csv/txt files, or do not use ANSI encoding (I reproduced your problem using code page windows-1250).
Try clicking on that image of the txt file in the window.
--Nate
Yes i'm sure. I created them from scratch in .txt. Super interesting, so it may be a Power BI detection bug.
Cannot reproduce
On my version of power bi : 2.138.782.0 64-bit (novembre 2024
i go directly there inside my PK file i try with your : it's :
"PK file"
Thank you for your investigation.
are you sure these are text files? PK are the initials of the creator of the ZIP file format...