How to keep leading zero in CSV file when exporting a report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2024 07:07 AM
Hi,
I'm creating a report using database view and the report will be exported to a csv file format. The report generation and distribution will be automated. The issue here, when the report exported to csv file format, some data are not displaying as expected e.g. those values with leading zero (00012345 only display as 12345). How can i address this issue? kindly advise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2024 08:01 AM
Hi, if you generate your report, you may add a leading apostrophe to the value you want to keep the 000, e.g. '00000. This can be done with different options.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2024 08:47 PM
Could you please provide more details on how to go about it. Since the report generation and distribution will be automated, how can i achieve this. Is it via system properties or can handle through database view?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2024 05:21 AM
One solution would be to either update the field with a leading apostrophe through a client script on update for example. You can also create a hidden field to hold this value with leading apostrophe. In the database view, the report should take this updated field. The issue is not the csv export which has the leading 000 but when Excel opens the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2024 02:37 AM
Sorry for the late reply, now the requirement has been changed, I will be creating a report using database view and the report(csv) will be exported to mid server. Please provide examples of scripts/steps to append apostrophe via export set or database view.