ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Save as .csv file removes trailing 00 (https://www.excelbanter.com/excel-discussion-misc-queries/44875-save-csv-file-removes-trailing-00-a.html)

Geir Holme

Save as .csv file removes trailing 00
 
Hi all.
I have a XL sheet with one column containing tekst and values. It is
partnumbers. Some of these starts with trailing nulls (the number 0). Like
00AB25 or 00056P-SDF.

It is populated from SQL Server 2000 varchar(30) field.

When I save as .csv file XL removes the trailing 0's and the partnumber in
the csv file changes to AB25 and 56P-SDF. Any ideas how to avoid this?


thanx.

geir




nsv


In the raw .csv file the leading nulls are preserved (try opening it
with Notepad and you will see), but when Excel reopens the file it
converts them to numbers. But only those partnumbers that do not
contain letters.

It is a clumsy solution, but you can rename your .csv to .txt. When you
then open it you get to choose Delimited (next), Comma (next) and
finally Column data format = text.

By the way, anyone know why my .csv files are actually semikolon
delimited?


--
nsv
------------------------------------------------------------------------
nsv's Profile: http://www.excelforum.com/member.php...o&userid=26500
View this thread: http://www.excelforum.com/showthread...hreadid=466716


Stefi

Hi nsv,
What language version do you use? I experienced that it depends on language
version. US version uses the original comma, my Hungarian version uses
semicolon, once I read in an old thread, that Swedish version also uses
semicolon. I was told that it is defined by Windows' list separator
(International settings), but changing it had no effect on Xl's behaviour.

Regards,
Stefi


€žnsv€ť ezt Ă*rta:


In the raw .csv file the leading nulls are preserved (try opening it
with Notepad and you will see), but when Excel reopens the file it
converts them to numbers. But only those partnumbers that do not
contain letters.

It is a clumsy solution, but you can rename your .csv to .txt. When you
then open it you get to choose Delimited (next), Comma (next) and
finally Column data format = text.

By the way, anyone know why my .csv files are actually semikolon
delimited?


--
nsv
------------------------------------------------------------------------
nsv's Profile: http://www.excelforum.com/member.php...o&userid=26500
View this thread: http://www.excelforum.com/showthread...hreadid=466716




All times are GMT +1. The time now is 01:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com