I try to export 20 maps with this python code in ArcGIS 10.3.1 for Desktop. Each map has excel sheet (not attribute table) in the layout view. The excel sheet file located in G:\Users\test\Downloads and imported from there:

import arcpy,os
from arcpy import env

env.workspace = r"G:\desktop\Project"
for num, mxd in enumerate((arcpy.ListFiles("*.mxd")),start = 1):
    print num,mxd
    mapdoc = arcpy.mapping.MapDocument(r"G:\desktop\Project\\" + mxd)
    r"G:\desktop\Project\ou\\" + os.path.basename(mapdoc.filePath).replace('.mxd','') +".jpg",resolution=196)
del mxd 

This code works fine, but when i insert object- excel sheet with those two options:

enter image description here

enter image description here

enter image description here

when i use the python code i get only white rectangle with no data table:

enter image description here

i red this , but didn't found any solution:

  • 1
    Where are you running your code from? This looks like a duplicate of gis.stackexchange.com/q/250498/115
    – PolyGeo
    Sep 20 '18 at 6:58
  • I add note to my question. i add excel sheet and not attribute table.
    – newGIS
    Sep 20 '18 at 7:30
  • 1
    Try installing a virtual PDF printer, such as PDF Creator or Cute PDF, and print (via PrintMap), not export.
    – fatih_dur
    Sep 20 '18 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.