It's a shame that in 2016 ArcGIS cannot export a table to xlsx dirrectly!
Not sure if this is the type of answer you're looking for, but since you're already using Python scripts...
XlsxWriter 0.8.5 : Python Package Index
>>> import xlsxwriter # import library ... fc = 'points' # feature class/layer ... workbook = xlsxwriter.Workbook('C:\junk\my_new_workbook.xlsx') # new workbook ... worksheet = workbook.add_worksheet() # create worksheet ... fieldnames = [i.name for i in arcpy.ListFields(fc)] # list fields in fc ... for field,fieldname in enumerate(fieldnames): ... worksheet.write(0,field,fieldname) # write field names to xlsx ... with arcpy.da.SearchCursor(fc,'*') as cursor: # loop through features ... for row,row_val in enumerate(cursor): # loop through rows ... for col,col_val in enumerate(row_val): # loop through columns ... try: ... worksheet.write(row+1,col,col_val) # if text or number, write value ... except: ... worksheet.write(row+1,col,repr(col_val)) # if something else (like a shape) write the representation ... workbook.close() # close the workbook
edit: just realized the original post was made 5 years ago, so it's possible that xlsxwriter didn't exist then, but it does now!
I think that it is the Friday afternoon migratory ghosts Darren...this isn't only only old post to come through
Dan, this is interesting. How often do these 'ghosts' practice their migrating? Is this why we see old stuff get bumped a lot?
Cleanup is done by us moderators during downtime ... which varies according to traffic and who is awake.
Old threads can get bumped when the poster makes an edit, a moderator changes a question to a discussion or when someone marks a question answered, or... when someone answers an old question that gets bumped then realizes the thread is many years old.
This gives others the opportunity to recommend options that someone else already posted since the order of threads in the mailbox is not in chronological order...ergo my response to Darren's missive.
Pretty well sums it up... On the upside, the original poster's email will be flooded with new traffic for something long forgotten...
PS moving to Managing Data since the generic GIS category is too generic
This makes sense. So it's safe to say that these 'ghosts' are just the moderators moderating? I am guessing there is no automatic migration that is making old threads get bumped?
not automatically... just automagically
Also, Esri has shipped tools to read and write Excel files. (They use Python modules that are shipped with ArcGIS.)
Here's the current story on Excel support in the help.
Understanding how to use Microsoft Excel files in ArcGIS—Help | ArcGIS for Desktop
But they only write to xls, not xlsx, as far as I know. Is there a method to write to xlsx out of the box?