Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SoniaIta86
New Member

Power query Issue in importing text from excel file- space automatically delete in a text column

Dear Members,

I have a problem in importing an excel file into Power Query : I have a column containing text with multiple space  that need to be preserved during the import process, but currently, the spaces are automatically removed upon import.

The table looks like this example

MaterialCode Material description

1234                Text PROD X          120KG PDR

3456                Text PROD X          1000KG IBC

25845              Text PROD X          BULK

25455              Text PROD YCS          BULK

 

the Material description does not have a fix lenght but beetween the first part of the description that identify the product name and the second part that identify the packing type there are always 11 empty space 

When I import the file in Power query all the multiple space are deleted.

1234      Text PROD X 120KG PDR

3456      Text PROD X 1000KG IBC

25845    Text PROD X BULK

25455    Text PROD YCS BULK

 

Is there any solution to avoid it?

thanks

Sonia

 

1 ACCEPTED SOLUTION
Cookistador
Super User
Super User

Hello @SoniaIta86 
What is the format of the data you are imported ?

Because I've done some trials, and the results is always return with the 11 spaces

View solution in original post

2 REPLIES 2
SoniaIta86
New Member

Hello ,

it is text in the original excel file. I realized one thing after your comment... it is only in the preview of power query that the text looks without space... example.PNG

that means that I shuold be able to extract the part of the text I'm interesting in ! I will try and if I need support I will ask you! thanks!

 

Cookistador
Super User
Super User

Hello @SoniaIta86 
What is the format of the data you are imported ?

Because I've done some trials, and the results is always return with the 11 spaces

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.