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 plz.

share|improve this question
2  
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
add comment

4 Answers

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
add comment

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
add comment

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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