Reputation: 21
I'm trying to import a CSV file to Excel power pivot. The CSV file has some numeric as text starting with "0". When we import the CSV file, the "0" was eliminated and shows as a number.
Upvotes: 2
Views: 4312
Reputation: 1
This works too: Ensure the data with the leading zeros is not in the first column of your data. I found embedded hidden charactors in the beginning of my data string. Moving the leading zero data to the second or third column of data solved the problem.
Upvotes: 0
Reputation: 1690
You could use a Schema.ini file to specify the data type of the columns - that could make PowerPivot interpret the input columns as you want.
Please check this for more details
http://msdn.microsoft.com/en-us/library/ms709353(VS.85).aspx
Upvotes: 4
Reputation: 3587
One answer is to pass it through an Access Database first.
You will have to manually intervene as you import the csv into the database to ensure it recognises the column as text not a long integer. You can then use the Access DB to feed PowerPivot.
Unless the CSV is colossal this is arguably a more robust workflow anyway and there are a number of advantages to having the source data in Access such as the ability to filter what you bring into PowerPivot, the option to query it using SQL and you can also use Access for memory hungry calculated columns so you don't need to do them in PP.
Jacob
Upvotes: 0