8

Does xlwings require an install of excel?

We are hoping to use it, with an anaconda install, on a windows server, with no EXCEL, to inject some data to a workbook and pass the workbook back to the user.

Dickster
  • 2,969
  • 3
  • 23
  • 29
  • 1
    Isn't xlwings for *interacting with* Excel (i.e. wouldn't it be pointless without Excel installed)? – jonrsharpe Jun 10 '15 at 21:45
  • So we want to take a pandas dataframe, inject it into workbook, that user has sent to us, then send the new workbook (ftp) to the user. User has Excel installed on their machine. – Dickster Jun 10 '15 at 22:50

1 Answers1

12

xlwings is indeed made for interacting with a running instance of Excel and therefore does not run on Linux.

You will want to have a look into the pandas to_excel method or you may even want to use one of the underlying libraries directly that this method uses (XlsxWriter, openpyxl and xlwt).

In short, with pandas you can do:

df.to_excel('output.xlsx', 'Sheet1')
Felix Zumstein
  • 6,737
  • 1
  • 30
  • 62
  • Seems like this could be a little clearer in their docs / site (which is great btw!) There's lots of mention of interacting with Excel, but perhaps as the authors are close to it they don't realise their unspoken assumptions – Neil Feb 03 '17 at 11:11
  • yeah, it's been on the list for quite some time: https://github.com/ZoomerAnalytics/xlwings/issues/200 – Felix Zumstein Feb 03 '17 at 12:16