Your message is a little confusing: are you importing or (I think) exporting?
What do you mean when you say that your file layout "becomes a mess"? Can you provide some sample data highlighting the problem?
Instead of 'passing spaces', what's wrong with an empty string?
If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.