import arcpy import sys import string import os tablePath = arcpy.GetParameterAsText(0) filePath = arcpy.GetParameterAsText(1) outfile = open(filePath, "w") fields = arcpy.ListFields(tablePath) fieldNames = [] for field in fields: if (field.type <> "Geometry" and field.type <> "BLOB"): fieldNames.append(field.name) outfile.write("<table border=""1""> ") outfile.write("<tr> ") for fieldName in fieldNames: outfile.write("<th>" + fieldName + "</th> ") outfile.write("</tr> ") for row in arcpy.da.SearchCursor(tablePath, fieldNames): outfile.write("<tr> ") for value in row: outfile.write(u"<td>" + str(value) + "</td> ") outfile.write("</tr> ") outfile.write("</table> ") outfile.flush() outfile.close()