Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Why can't I use xlsxwriter on my Python tool?

admartin1211
6 - Meteoroid

Hello,

 

I am not well-versed in Python, so forgive me (and please correct me) if there are any inaccuracies. I am currently trying to use the Alteryx Python tool to format an Excel report that I am generating via Alteryx. In particular, one type of formatting I am looking to do is orient, or rotate, the text in my header column of the Excel file (like at a 45° angle). I read elsewhere that xlsxwriter would be conducive to that and that, typically, xlsxwriter is a module within the Pandas package in Python. However, within the Python tool in Alteryx, it does not recognize xlsxwriter as an existing module, even after importing Pandas (or even trying to import xlsxwriter by itself). I keep getting the "Module not found" error when I run it.

 

Is there a reason that I cannot run xlsxwriter through the Alteryx Python tool despite it being a part of a package that is automatically included in Alteryx's library (Pandas)?

 

A couple notes: The fields can change with each run of the workflow (monthly), so I can't import an existing excel and retain formatting upon output. I also do not have admin privileges, if that impacts any solution suggestions.

 

Thanks!

3 REPLIES 3
geraldo
13 - Pulsar

@admartin1211 

 


Did you import the XlsxWriter library into the Python tool?

 

 

xlsxpython.JPG

admartin1211
6 - Meteoroid

@geraldo 

 

I tried installing it the way you show in your screenshot and via other methods (ex: "from Pandas import XlsxWriter"), none of which have worked and all which produce errors. For the method you show, I get a CalledProcessError saying that the Command returned a non-zero exit status 1, along with the following details:

 

XlsxWriter Error.png

 

Other methods of importing have produced similar "Module not found" errors. Is the XlsxWriter package one that Alteryx should have by default? If so, I may just need to coordinate with my IT.

geraldo
13 - Pulsar

@admartin1211 

 


Are you not in a network environment that has a proxy?

Labels