Whenever possible I avoid installing Python libraries other than those installed with ArcPy by the ArcGIS Desktop 10.x and ArcGIS Pro installs but occasionally I have for ReportLab, gdal, pyodbc and I usually find several ways are suggested and I only get them working after some experimentation.
I would like to be able to copy a worksheet from one Excel (*.xls
) spreadsheet, created using TableToExcel in ArcPy, to another Excel (*.xls
) spreadsheet (also created by ArcPy), and the only technique that I found that looks promising for doing this is in this answer to Writing to existing workbook using xlwt
That technique commences by importing xlrd
, xlwt
and xlutils
using the re-ordered lines below:
from xlrd import open_workbook
from xlwt import easyxf
from xlutils.copy import copy
When I run them using IDLE from Python 2.7.10 that was installed with ArcGIS 10.4.1 for Desktop I get this error which indicates that xlrd
and xlwt
are available but xutils
is not.
Traceback (most recent call last): File "C:\Fyfe\xutilsTest.py", line 3, in from xlutils.copy import copy ImportError: No module named xlutils.copy
This matches what I see when I look in C:\Python27\ArcGIS10.4\Lib\site-packages
where xlrd
and xlwt
folders can be seen but no xlutils
.
Is there a simple process that will let me download a folder of Python code for xlutils
and copy it into the same folder to make import xlutils
just work?
Installing third party python libraries in ArcGIS location gives me some hints about what may need to be done but that Q&A seems to be more understandable by someone who develops using a higher Python:ArcPy ratio than I do.
pip
folder in the same location asxlrd
andxlwt
but the ArcGIS install does not provide a path that makespip
recognizable as a command. To save me wading through stackoverflow.com/questions/4750806/… is there something that just has to be added onto PYTHONPATH to make pip available to a DOS prompt?pip
withpython -m pip