Select to view content in your preferred language

Values change when pasting values from Microsoft Excel

2469
3
Jump to solution
02-03-2022 11:08 PM
RodriguesNeto
New Contributor

Hello. I have been trying to copy a whole column from a Microsoft Excel and paste it into another column in a shapefile in ArcGIS Pro with CTRL+V. However, every time I try to do so the values change, specifically losing decimal places.

Copied values in Excel:

RodriguesNeto_0-1643958238071.png

Values pasted in ArcGIS (highlighted column):

RodriguesNeto_1-1643958463110.png

 

I have checked and re-checked the field's data types and it doesn't seem like that would be the problem. Importing similar values with decimal cases from other field using Calculate Field doesn't reproduce the problem, so I suppose the cause lies in the pasting process.

Does anyone have any idea of what might be causing this issue? All help would be appreciated.

 

0 Kudos
1 Solution

Accepted Solutions
KimGarbade
Frequent Contributor

If the RFSTEST attribute in your table is defined as either a Float or a Double, and the precision and Scale of the Float or Double are set correctly to accommodate the pasted data then I might try changing something in Excel. If the column you are cutting out of in Excel is set to general or text you might try converting its contents to a numeric data type in Excel. Another thing I might try is converting your Excel sheet to a table in Excel.

That being said I also don't copy and paste from Excel. I would would bring the Excel data into a map doc, create a join in the common key field, calc the field values over, then remove the join. That ensures the correct data goes to the correct record. 

View solution in original post

3 Replies
IlkaIllers1
Frequent Contributor

I sometimes have similar issues because we use a comma to separate decimals and a point as a thousands separator. Several programmes have been known to get confused between the two different formats. Could that be your problem?

If you checked data types and they are the same, this is the only reason I can think of.

I did stop copy & paste from Excel since I had several issues with it, especially when trying to do a join afterwards. Importing it as a table is a safer option in my opinion.

KimGarbade
Frequent Contributor

If the RFSTEST attribute in your table is defined as either a Float or a Double, and the precision and Scale of the Float or Double are set correctly to accommodate the pasted data then I might try changing something in Excel. If the column you are cutting out of in Excel is set to general or text you might try converting its contents to a numeric data type in Excel. Another thing I might try is converting your Excel sheet to a table in Excel.

That being said I also don't copy and paste from Excel. I would would bring the Excel data into a map doc, create a join in the common key field, calc the field values over, then remove the join. That ensures the correct data goes to the correct record. 

RodriguesNeto
New Contributor

Thank you! Using 'format cells' in Excel to set the cell category as 'number' before pasting it  into ArcGIS worked. As you and @IlkaIllers1 also mentioned, though, I'll refrain from pasting directly from Excel when possible.

0 Kudos