I would like to convert a column in a spreadsheet from a double to a string so I can join the data with a shp file. What is the easiest way to do it?
To do this in ArcGIS:
- Import spreadsheet to Geodatabase (Import Table)
- Add a new field to table (change type to text)
- Open ArcMap and add table to TOC
- Right click on the new field's column header and select "Field Calculator"
- Scroll down the field list to find your "double" source field
- double click the field (should appear in the bottom pane)
- click OK to populate column with values
I am suggesting to do this in ArcGIS because I think you want to use this field as a "join"? If so, add the shapefile to ArcMap, right click on the layer and select "Joins and Relates".
Usually it suffices to force the field value in the first data row to be a string, for then the software is obliged to treat the entire column as string data. An easy way is to insert a single quote (') mark at the beginning of the value.
Use ArcCatalog. Create a GDB, import the table (single) into it. Below in the fields you can right click on the field you want to change to STRING, and simply change the type to STRING for that field.
(*it seems that this may only work if the field is empty)
You can use the CONCATENATE function (if using Excel) to form a single quoted string.
where this formula refers to the first row, and can be copied to other rows as well.
Microsoft has a page dedicated to this with a range of solutions: