Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a Excel file showing annual precipitation and I add it on arcmap. When I tried to check it's attribute table the field calculator is passive. I want to change all the Null value to specific number for analysis. How can I solve it please?

share|improve this question

closed as unclear what you're asking by PolyGeo, Chad Cooper, Simbamangu, mkennedy, BradHards Apr 28 at 22:46

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

3  
Excel data cannot be edited using ArcMap. It sounds like you may have added it to ArcMap as an XY Event Layer so from there you could Export to Shapefile or Feature Class and then use the Field Calculator. –  PolyGeo Mar 22 '13 at 1:12
    
Revisiting this Question it is not clear to me whether you are asking why you cannot use the Field Calculator on an XY Event Layer or how to change nulls to numbers. If it is both then this Question appears to be too broad. –  PolyGeo Apr 28 at 11:55
    
I voted too broad but if Question becomes what is in the title then I think it is a duplicate of gis.stackexchange.com/questions/29146/… –  PolyGeo Apr 28 at 21:30

5 Answers 5

If your data is an Excel table to start with, you can do a global search and replace in Excel before importing to ArcGIS.

share|improve this answer
    
Thank you PolyGeo, I luv your answer –  user16377 Mar 23 '13 at 5:13

Try this method :

  1. Import your Excel sheet to ArcMAp
  2. Export the sheet to dbf
  3. Go to table properties of dbf
  4. select Definition query => click Query Builder
  5. Select the field with Null values then Click "Is" Button
  6. Click "Get Unique Values and select Null
  7. Now you can use Field Calculator to change Null.

sample : "City" IS NULL

share|improve this answer

if you import it to a gdb you can run calcField like so

  1. open the Calculate Field tool
  2. set the input table, field name (your date field), expression type to PYTHON
  3. set the expression to

    x(!your_date_field!)
    
  4. put this code into the code block (update my dec 31 1981 to your desired date)

    import datetime
    def x(v):
    if v is None:
      return datetime.datetime(1981, 12, 31)
    else:
      return v
    
share|improve this answer

If you want to be able to edit the file directly in ArcMap, you can also save your .xls as a .dbf before importing it.

share|improve this answer
1  
Please explain how and/or that would help solve the problem described in the question. –  lynxlynxlynx Apr 21 '13 at 10:11
    
The older versions of Excel (maybe 2003?) allowed save as.. with .dbf , but not the newer versions. I use open office Calc rather than Excel for that reason. Also there's Libre (office?) Calc that does the same. Whenever you do this, be careful about the field being either string or number (and formatted to the digits you need) because the resulting .dbf imports those fields' formats and that's always what trips me up. –  Geocurious Apr 22 '13 at 1:39

I would take the following approach with the field calculator:

enter image description here

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.