Forum Discussion
text field treated as number while exporting to csv - missing zeros after a dot
hi! I have a PowerBI report that I need to export to .csv. Some of the columns have different data types stored as text e.g. 12.300 or 89.2000. In .csv those values are being displayed as 12.3 or 89.2 but I need them with the zeros at the end. I tried the following:
1) making sure that the columns store data type as text in Power BI
2) disabling in options the detection of column types and headers.
3) the solution I encountered is to put a space or ' in front of the number, but it gets exported this way and I don't want the space or ' in the .csv in front of the value.
Is there a way to get the data exported correctly?
- Anonymous2 years ago
Hi, Kasia1
The problem you're experiencing isn't a Power BI problem, it's a feature of Excel. When Excel opens .csv file, it automatically formats the numbers and removes the trailing zeros
You can try using another app to open a CSV file, such as Notepad
You can also check out the video below
How to Keep Leading Zeros in Excel CSV Import (youtube.com)
Related posts can also be viewed, below are the link:
Solved: Leading zeros disappear while exporting to csv - Microsoft Fabric Community
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi, Kasia1
The problem you're experiencing isn't a Power BI problem, it's a feature of Excel. When Excel opens .csv file, it automatically formats the numbers and removes the trailing zeros
You can try using another app to open a CSV file, such as Notepad
You can also check out the video below
How to Keep Leading Zeros in Excel CSV Import (youtube.com)
Related posts can also be viewed, below are the link:
Solved: Leading zeros disappear while exporting to csv - Microsoft Fabric Community
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.