POST
|
This part of the script is working! Thank you Mr. Scheirer!
... View more
11-18-2013
11:53 PM
|
0
|
0
|
3274
|
POST
|
Mr. Scheirer, Thank you so much for the script modification suggestion. I am going to try to run the updated python script today. Currently I am using the trial version of arcgis 10.2. Thank you again for your help.
... View more
11-18-2013
02:27 AM
|
0
|
0
|
3274
|
POST
|
Thank you Mr. Scheirer for sticking with me and continuing to provide advice and guidance. I ran the code using Python Win and then Python Idle 2.7 and am still receiving a syntax error on line 11 on the word open. With me being very new to Python I am not sure if I have to add anything extra to this script like specific file names or pathways as I am currently just running the code as seen below. Thank you again for your patience and help. import csv
import gspread
g=gspread.login('skiesgoinggreen@gmail.com', 'XXXXXXXXXXXX')
docid = "0AgNp9UJ4CX93dHl3RW9GRXJDS3kxaXRJMGNqWmhQWVE"
spreadsheet = g.open_by_key(docid)
for i, worksheet in enumerate(spreadsheet.worksheets()):
filename = docid + '-worksheet' + str(i) + '.csv'
with open(filename, 'wb') as f:
writer = csv.writer(f)
writer.writerows(worksheet.get_all_values())
... View more
11-15-2013
07:04 AM
|
0
|
0
|
3274
|
POST
|
What you changed it to is correct on what the script is supposed to look like. I apologize about the formatting mistake.
... View more
11-14-2013
03:44 PM
|
0
|
0
|
3274
|
POST
|
I am working with a google spreadsheet that shows active big foot sightings data. What I am trying to do is convert the google spreadsheet to a .csv file so that I can then use geoprocessing tools placed in GIS Model Builder to take the .csv file and turn it into a table, and then a point shapefile showing the xy coordinates. That part is easy. It's just the first step that has me. I am receiving a syntax error when I try to run the python script. Here is what I have: import csv import gspread g = gspread.login('skiesgoinggreen@gmail.com', '???') docid = "0AgNp9UJ4CX93dHl3RW9GRXJDS3kxaXRJMGNqWmhQWVE" spreadsheet = g.open_by_key(docid) for i, worksheet in enumerate(spreadsheet.worksheets()): filename = docid + '-worksheet' + str(i) + '.csv' with open(filename, 'wb') as f: writer = csv.writer(f) writer.writerows(worksheet.get_all_values()) Thank you in advance for your help and suggestions.
... View more
11-13-2013
03:32 PM
|
0
|
7
|
6027
|
POST
|
Thank you so much for your answers and for the link to the blog post about setting up the task scheduler to run Python scripts. This was very helpful and my script is now running successfully. Thank you again. Have a great day!
... View more
10-23-2013
11:12 AM
|
0
|
0
|
207
|
POST
|
I am very new to Python and have just made a script that will create a map book pdf file. What I am trying to do now is determine what python script I would have to add to make this run every day to create an updated map book while deleting the map book pdf file from the previous day. Here is the code I have so far: import arcpy pdfpath = "P:/Projects/Joseph/Map Book/Lewisville Parcel Map Book.pdf" pdfdoc = arcpy.mapping.PDFDocumentCreate("P:/Projects/Joseph/Map Book/Lewisville Parcel Map Book.pdf") mapdoc = arcpy.mapping.MapDocument("P:/Projects/Joseph/Map Book/MapBook.mxd") mapdoc.dataDrivenPages.exportToPDF("P:/Projects/Joseph/Map Book/Lewisville Parcel Map Book.pdf") pdfdoc.appendPages("P:/Projects/Joseph/Map Book/Cover.pdf") pdfdoc.appendPages("P:/Projects/Joseph/Map Book/Lewisville Parcel Map Book.pdf") pdfdoc.saveAndClose() del mapdoc Thank you in advance for your help.
... View more
10-23-2013
09:31 AM
|
0
|
3
|
433
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|