ashishjain
23rd July 2010, 08:39
Hi All,

We are havin a session to export some data from baan to excel. There is a string field of length 3 called "Revision Number" in our report. The excel file is delimited by pipe (|) symbol. When we delimit (text to column) this file the leading zeros of field "Revision Number" gets truncated. We want the record in excel must be as it is in baan table.

Example: Revision No. in BaaN table is 001, 010 etc. but in excel it's showing as 1, 10 respectively. We want the output as 001, 010 in excel.

Quick response would be appreciated.

norwim
23rd July 2010, 12:46
Hi there,

this is a feature of excel (automagically formatting the imported data).
You have to declare the column as "text", then leading zeros will be kept.

regards

Norbert

shah_bs
23rd July 2010, 19:41
Since you are manually 'importing' the data into EXCEL, Norbert's suggestion is better - mark each column and specify what type it should be.

But the following will also work - but requires you to modify your session: if you enclose the field which has leading zeroes with a =" and ", then the leading zeros will be 'preserved'.

For example, if your output file is as follows:

="001"| 001
="A001"| A001

This has two columns. Save this as a text file and try your 'import' steps on it.

ashishjain
26th July 2010, 19:06
Thanks shah. It works for me :)