Reading Postal Code From .csv file (via table) trims leading 0

shrunkeehead

Новичок
Регистрация
07.11.2012
Сообщения
7
Благодарностей
0
Баллы
0
Greetings,

I am reading a .csv text file thru the Table feature of ProjectMaker. I have column "Postal Code" which often begins with a 0 and is in the format "01234". My problem is that when the data arrives in ProjectMaker, it is given as "1234". Is there any way to prevent the leading zero from begin excluded?
I have tried armoring the field with quotes and so forth, without success. Do I need to prepend the zero manually? Please help.

Best Regards,
Scott
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 712
Баллы
113
Do you talk about preview which you can see in table's settings or about taking data from table and about what you see in variables when you take it from there?
 

shrunkeehead

Новичок
Регистрация
07.11.2012
Сообщения
7
Благодарностей
0
Баллы
0
Hello,

Both.

01234 in the actual .csv file displays as 1234 in the Table preview and 1234 in the variable that was taken from the Table.

Thanks in Advance,
Scott
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 712
Баллы
113
Ok. Will test today.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 712
Баллы
113
All 02121 0787 formatted to 2121 and 787 in my Excel automatically...
Can you provide you table file?
 

shrunkeehead

Новичок
Регистрация
07.11.2012
Сообщения
7
Благодарностей
0
Баллы
0

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 800
Благодарностей
1 187
Баллы
113
  • Спасибо
Реакции: shrunkeehead

shrunkeehead

Новичок
Регистрация
07.11.2012
Сообщения
7
Благодарностей
0
Баллы
0
In column F there is no any ''0'' at the beginning.

UPDATE: This zero thing is not zenno fault. It is excel.
I would suggest you to use .txt files for your job. or add ''work with text'' action in zennoposter and add that zero there...
I appreciate your trying to help. This file was created with Notepad. I think you are telling me to use the .txt extension on my file because that is handled differently from .csv extension in ZennoPoster. I will give that a try.

Best Regards,
Scott
 

traumatic

Client
Регистрация
22.10.2012
Сообщения
10
Благодарностей
1
Баллы
0
In column F there is no any ''0'' at the beginning.
Sorry but that is not correct as there ARE leading zeros. If you can't see them it may be because your opening the csv via doubleclick / excel.
Just open the csv in notepad or any other text-editor and you will see the zeros.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 712
Баллы
113
If you need to operate data in the way it presented in Notepad, use *.txt extension for you file.
If you use *.csv extension, get ready for data to be presented like in excel.
 
  • Спасибо
Реакции: traumatic

shrunkeehead

Новичок
Регистрация
07.11.2012
Сообщения
7
Благодарностей
0
Баллы
0
In column F there is no any ''0'' at the beginning.

UPDATE: This zero thing is not zenno fault. It is excel.
I would suggest you to use .txt files for your job. or add ''work with text'' action in zennoposter and add that zero there...
As per the Moderators suggestion, and yours, I simply changed the filename extension from ".csv" to ".txt" and it works! The leading zero is now retained.
Thank you both!

Best Regards,
Scott
 

Кто просматривает тему: (Всего: 2, Пользователи: 0, Гости: 2)