Create lists with Code in text format

Highlighted
Occasional Contributor

Create lists with Code in text format

Hi,

I have list called "Employee" with code like "0000007". I need to import this employee details to my list. But when i convert my input file from excel to CSV, the code column getting convereted as number (like only '7').

Can someone help me to create the list with text formatted code.

Thanks,

Sangeetha

5 REPLIES 5
Highlighted
Certified Master Anaplanner

Re: Create lists with Code in text format

Hi,

 

losing the leading zeros is annoying with CSV's.

 

I'll typically place a single quote in front of the value (in excel) before saving as a CSV... '000007

 

Paul

Highlighted
Occasional Contributor

Re: Create lists with Code in text format

Hi Paul, Thanks for the reply.

I tried this way adding single quote in front of the code & imported the same to Anaplan. The issue is single quote appearing in Anaplan as well. Is there any other way where i can upload the data without single quote.

 

Regardss

Sangeetha

Highlighted
Certified Master Anaplanner

Re: Create lists with Code in text format

The key is to ensure the value is a text string (in excel) prior to saving.  If the leading zeros are in the CSV file, they will get loaded into Anaplan correctly... try opening the CSV file with a text editor (I use Notepad++)... you should see the zeros in the text editor.  You shouldn't see the single quote.

 

The single quote, for me, works every time, but I only use it if I have to.  When opening the file in Excel (if you want to view it) open the file in a way that doesn't cause Excel to convert the column to numbers (and remove the leading zeros).  For example, open the file using:  Data > From CSV > Do Not Detect Data Type.  There are other ways...

 

 

 

 

Highlighted
Occasional Contributor

Re: Create lists with Code in text format

When you manipulate or open a .csv file the leading zero's get truncated.   If you need to manipulate the data, you can perform a text import of the .csv file into excel and format the columns to preserve the leading zeros.   I've attached some screenshots in a word document as an example.   Hope this helps.

Highlighted
Occasional Contributor

Re: Create lists with Code in text format

Thank you all for the replies.

 

I found the solution. I saved the .csv file as .csv.txt & then reopened the file in excel using text to columns options & changed the code format to text. I used this file for importing into Anaplan.

 

Cheers.

Sangeetha