AnsweredAssumed Answered

Using Python to automate task in excel

Question asked by natb02 on Jan 25, 2016
Latest reply on Jan 27, 2016 by natb02

Hello GIS community,

I have a spreadsheet exported from a shapefile attribute table of Fores_Ownership_by_County for each of 4 states in the Pacific Northwest.  It is a very large spreadsheet (lots of rows), with the data representing small polys of forested area in each county. Of the many columns, there is a column for County Name (called instName below) and one for Owner Type (U.S. Forest Service, Private, State, or Non-USFS - Fed (Other Public-Fed below)).  I also have a spreadsheet listing the harvested forest biomass density for each county by ownership, see below, one for the county name and a density listed for each of the 4 ownership types. I would like to write a Python code to automate this task of looking in the density sheet for the county name and owner type, and reporting the density in the large sheet, but I am new to Python and am stuck. Any help would be appreciated. Especially if there is a way to write the program to run in GIS and populate the Forest Ownership by County attribute table directly.   Below are two snapshots of the two worksheets I am talking about:

 

Forest Ownership by County worksheet:

 

Density Worksheet:

 

Many thanks,

natalie

Outcomes