hello,
I export navision data to a CSV file.
this works fine, the only problem i have got is formatting data. For example, if i want to export the value 00001 i got in my CSV file 1.
So I thougt, lets make all the sheet set as text.
But no effect.
anybody got a solution ?
Thx
0
Comments
2. what is the data type ?
you will have to use FORMAT function and/or some other string functions. please read in help how to use it.
a hint. if you want to format an integer iMyInt with a fixed length (iTargetLength) string (tMystr) with leading zero here's one way to do it:
tMyStr := PADSTR('',iTargetLength - STRLEN(FORMAT(iMyInt)),'0') + FORMAT(iMyInt);
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
The datatype is code
I Hope this can help you
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
But when he is automaticly opened in Excel, the leading zeroes are gone.
I tried to set my worksheet as text but no result
What you can do is to name your file with .txt extension. and open a file with notepad (etc.). use CTRL+A (Select All) and CTRL+C to copy all and paste it to clear excel sheet. BUT before pasting in Excel select all cells in Excel and set cell format to text.
If the filed delimiter in your dataport is , or ; you will have to split your cell data. But instead of doing this, just change the field delimiter in dataport to <TAB>.
Then when pasting to Excel fileds will be placed into own cells...
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
The file extention should be ".TXT" (not ".CSV"). When you open the file a window will open where you select the delimeter, etc.
When you press next you can select a format for each column - select text format for your column.
Wish you success!
'00001 - when it goes into excel does it leave 00001 in the field?
http://www.BiloBeauty.com
http://www.autismspeaks.org
are we missing something ?
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯