publishing python script as geoprocessing

1846
0
06-04-2013 02:13 AM
NadeemQazi
New Contributor III
I have following python script and i want to publish it as geoprocessing service so that it can be used by the web client. I know how to publish  a model created with the model builder but need help for this . any help is appreciated.

import xlrd    # xlrd is the package used to read the excel sheet.
wb = xlrd.open_workbook('C://WEXFORD//Donatas_cost_May13.xlsx')

# Load XLRD Excel Reader

sheetname = wb.sheet_names() #Read for XCL Sheet names
sh1 = wb.sheet_by_index(1) #Login 2. Decentralised Plant
Celllist=[]
colindex=5  #index start 0
arrayindex=[12,16,17,20,21,23,24] # index start 0
for row in arrayindex:
    Celllist.append(sh1.cell(row,colindex))
return Celllist
Tags (2)
0 Kudos
0 Replies