How to Export with Leading Zeroes Into a CSV File
I want to Import Data from an external application, do some research and calculation on it and export it later for further processing. The output file is then uploaded to another application that requires leading zero(s) for integer.
As an export into a CSV will result technically in a TXT file, we could create a separate column or sheet where the INTEGER value is converted into a STRING. This STRING needs to be formatted with leading zeros before export. E.g. if you have a kind of ID, which can have nine digits, than you need to add nine zeros before.
The second function will convert the INTEGER into a BIGDECIMAL and convert than into a STRING. This is to workaround DAP-21688. It adds the leading zeros and catch up the nine significant digits from the right side.
Solution Proposal 1
Solution Proposal 2