-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvvimp_27June_7AM.txt
More file actions
46 lines (41 loc) · 1.62 KB
/
vvimp_27June_7AM.txt
File metadata and controls
46 lines (41 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import arcpy
import xlrd
import array
from array import *
counterSHP = 0
counterXLS = 0
list = []
A = arcpy.GetParameterAsText(0) # Import
#arcpy.AddMessage("params")
#arcpy.AddMessage(A)
myList = [arcpy.GetParameterAsText(0)]
arcpy.AddMessage("params length")
arcpy.env.workspace = "F:\Survey\Mussoorie\Test For Automation back to arcgis"
#arcpy.AddMessage(arcpy.ListFiles("*.xls")[0]) # returns the name of the .xls file at the zeroeth location
#arcpy.AddMessage(arcpy.ListFiles("*.shp")[0]) # returns the name of the .shp file at the zeroeth location
#arcpy.AddMessage(len(arcpy.ListFiles("*.shp")[0])) # returns the length of the name of the file at the zeroeth location
#arcpy.AddMessage(arcpy.ListFiles("*.shp")[0][:2]) # returns the first 2 characters of the name of the file
for i in arcpy.ListFiles("*.xls"):
#a= array(i)
counterXLS = counterXLS + 1
arcpy.AddMessage(i)
book = xlrd.open_workbook(i)
sheet = book.sheet_by_index(0) # Get the first sheet
arcpy.AddMessage(counterSHP)
list.append([sheet.cell(14,7)])
arcpy.AddMessage (sheet.cell(14,7).value)
arcpy.AddMessage("list len")
arcpy.AddMessage(len(list))
for j in arcpy.ListFiles("*.shp"):
counterSHP = counterSHP + 1
arcpy.AddMessage("counterSHP value is ")
arcpy.AddMessage(counterSHP)
arcpy.AddMessage ("(counterXLS value is ")
arcpy.AddMessage(counterXLS )
for num in range(0,counterXLS):
arcpy.AddMessage ("num is")
arcpy.AddMessage (num)
arcpy.AddMessage ("name of cluster file is : ")
arcpy.AddMessage (arcpy.ListFiles("*.shp")[num][:2])
arcpy.AddMessage ("for value ")
arcpy.AddMessage (list[num])