Loss of "0s" when converting a file
Solved
sebi68
Posted messages
87
Registration date
Status
Membre
Last intervention
-
tatichak -
tatichak -
Hello,
I have a problem when converting an xls file to csv; I lose the leading 0s in front of the numbers
e.g.: 00789 becomes 789
before the transfer I set the cell format to text, but it didn't change anything...
does anyone have any ideas? please
thank youuuuuuuuuuuuu
I have a problem when converting an xls file to csv; I lose the leading 0s in front of the numbers
e.g.: 00789 becomes 789
before the transfer I set the cell format to text, but it didn't change anything...
does anyone have any ideas? please
thank youuuuuuuuuuuuu
Configuration: Windows 2000 Internet Explorer 6.0
8 réponses
Hello, and thank you for participating
I made sure the 0s are there in xls, I save it as csv on the screen before closing the file, it's fine then.....
same thing!!! I reopen my csv file and no more 0!!!
I think that simply a csv file cannot display 0s before anything else....
sniff, see you later!
I made sure the 0s are there in xls, I save it as csv on the screen before closing the file, it's fine then.....
same thing!!! I reopen my csv file and no more 0!!!
I think that simply a csv file cannot display 0s before anything else....
sniff, see you later!
Hello,
yes I see ... indeed I really wanted to see the 0s when opening the file in Excel. With Wordpad, the famous 0s are definitely there!!!
Thank you! Have a good Monday ...
yes I see ... indeed I really wanted to see the 0s when opening the file in Excel. With Wordpad, the famous 0s are definitely there!!!
Thank you! Have a good Monday ...
Hello,
Try with Format / Cell / Number / Custom,
in Type: 00###
adapting the number of hashes to the number of digits.
--
Argitxu
Try with Format / Cell / Number / Custom,
in Type: 00###
adapting the number of hashes to the number of digits.
--
Argitxu
I tried, but it's the same, I lose the zeros when I reopen the CSV file...
Thanks for helping with my issue!!!
I think I've tried everything... it must not be possible...
See you!
Thanks for helping with my issue!!!
I think I've tried everything... it must not be possible...
See you!
Okay, I'll try to be a bit clearer...
I'm using a CSV file for data import into a CMMS software
for items, for example, I have the item code with 7 digits 0012345
initially, I have an XLS file, the import into the CMMS software goes through an application that requires a CSV file. I'm therefore forced to convert my original file into CSV and then I lose the leading zeros...
hoping I've been a bit clearer, thank you for your participation!!!!
I'm using a CSV file for data import into a CMMS software
for items, for example, I have the item code with 7 digits 0012345
initially, I have an XLS file, the import into the CMMS software goes through an application that requires a CSV file. I'm therefore forced to convert my original file into CSV and then I lose the leading zeros...
hoping I've been a bit clearer, thank you for your participation!!!!
Hello,
You're so close to the answer and ...
You've understood it, Excel strives to treat numbers faithfully. Your insignificant zeros are just fluff.
So... as Alphonse Allais said: logic leads to everything as long as you know how to... get out of it!!!
So turn your numbers into strings!
Imagine you have 125 in cell A1. You put this formula in a new cell:
=RIGHT("0000000"&TEXT(A1,0),7)
The result will be a text string "0000125" that should be suitable for your CMMS software.
You do a copy/paste special (values) on your original cell and you're good to go (just for testing).
I actually recommend preparing a new sheet, which will only contain your formulas referencing your original sheet (like in my example) with your 000???? values in text format. It’s this new sheet that you will export.
Keep me updated. See you soon!
You're so close to the answer and ...
You've understood it, Excel strives to treat numbers faithfully. Your insignificant zeros are just fluff.
So... as Alphonse Allais said: logic leads to everything as long as you know how to... get out of it!!!
So turn your numbers into strings!
Imagine you have 125 in cell A1. You put this formula in a new cell:
=RIGHT("0000000"&TEXT(A1,0),7)
The result will be a text string "0000125" that should be suitable for your CMMS software.
You do a copy/paste special (values) on your original cell and you're good to go (just for testing).
I actually recommend preparing a new sheet, which will only contain your formulas referencing your original sheet (like in my example) with your 000???? values in text format. It’s this new sheet that you will export.
Keep me updated. See you soon!
I did this too, but when I convert the xls file to csv and then save it, close it, and reopen it, the 0s no longer appear ...
See you later
Personally, I don't really see the point of saving in CSV if it's to reopen it in Excel... Why don't you explain what you're trying to achieve instead?
Eric