Jump to content
  • 0

Exporting Fields Defined As Text Fields To Csv Files


bcmarina
 Share

Question

2 answers to this question

Recommended Posts

  • 1

Hi @bcmarina,

 

This is an expected behavior when opening CSVs, but you can bypass this by doing a couple of things on Excel and keep the leading zeroes on the Excel:

1.      Open the Excel application itself.

2.      On the Data tab, select “From text/CSV”

image.png.66efe30ab199954d7ec6d0d4a8850572.png

 

3.      Select your CSV file, and Import.

4.      The Import Wizard will show up. Click “Transform Data”

image.png.5fb31ae655fb18a8cac075c9df37e041.png
 

5.      On the next screen, select the field in question, and change the data type to Text.

 

image.png.579abfb0415a9eee7ffaf4d6986541c8.png

image.thumb.png.dd5fe57f60a170e74cc221d36359114e.png

 

6.      Choose “Replace current”

image.png.5bdcf799668d75acbac70af96432aace.png

 

7.      Click on Close & Load.

image.png.95786a418228621a4aba9fb20b86000a.png

 

Output:

image.png.d15aed8a94c8aced640fc356e04c74f9.png

 

Hope this helps!

Link to comment
Share on other sites

  • 0

Hello bcmarina,

 

Welcome to Caspio forum!

 

Do you open the exported file with Excel? Excel dropps leading zeros often. You can try opening the file with Notepad and check, if zeros are saved in the .csv file.

 

I have found several articles that describes how to open a .csv file and save leading zeros:

one

two

three

 

I hope, it helps.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...