Hosted table field only uploading as a string, not a a double

835
3
03-19-2024 06:45 AM
mjgpcog
New Contributor

Hi all,

I am trying to load an .xls file into my ArcOnline account as a hosted table with a series of tabular data. When I decide on which fields to upload and what their field type will be, I continue to ensure that one of the columns is categorized as a "double" field, but when I upload the file and host the table on my account, the column uploads as a "string" field, which doesn't allow me to do any analysis. This is happened despite ensuring that that there is not text in the column, that the values are all formatted as numbers in Excel, and what not.

I have reuploaded and reformatted the file, wiped the slate clean on it multiple times and tried to control for various possible causes, but I have yet to find a fix. Has anyone ever encountered this problem before and know what can be done?

0 Kudos
3 Replies
jcarlson
MVP Esteemed Contributor

Unfortunately, your field formatting in Excel doesn't matter. When AGOL reads in your file, it does it all as text, then makes its best guess about the field types based on their contents.

The best way to go about this, in my opinion, is to create an empty layer with the schema you want first, then use the contents of your file to append records to it.

- Josh Carlson
Kendall County GIS
RhettZufelt
MVP Notable Contributor

Have not used Excel files in AGOL, but ArcMap often had issues with this.

Seems ArcMap would look at the first value in each field (first row of data) and determine the type from that.

If there was anything but a number (even a blank) in the first row, it brings it in as text.

So, I just added a dummy first line with an appropriate value for each field, then delete that line after import.

Not sure if this would matter in AGOL, but could try.

R_

ChristopherCounsell
MVP Regular Contributor

There are a lot of reasons this can occur. XLSX is also the trickiest. Take a read of this for CSV

https://support.esri.com/en-us/knowledge-base/problem-generic-errors-from-uploading-and-published-cs...

0 Kudos