Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>From the comments it is not completely clear if you need to 'update' an Excel file with data, and just assume that you need Excel to do so, or that you need to change some excel files to include new data.</p> <p>It is usually much easier, and certainly faster (wrt excution speed) to go with 'updating' an Excel file without starting Excel. However updating is not the right word: you have to read in the file and write it out new. You can of course overwrite the orginal file, so it looks like an update. </p> <p>For 'updating' you can use the trio <a href="http://www.python-excel.org/" rel="nofollow"><code>xlrd</code>, <code>xlwt</code>, <code>xlutils</code></a> if the files you work with are <code>.xls</code> files (Excel 2003). IIRC xlwt does not support <code>.xlsx</code> for writing (but <code>xlrd</code> can read those files).</p> <p>For <code>.xlsx</code> files I use <a href="http://pythonhosted.org/openpyxl/" rel="nofollow"><code>openpyxl</code></a>, </p> <p>Both are good enough for writing things like data, formula and basic formatting.</p> <p>If you have existing Excel files which you use as 'templates' with information that would get lost if you read/write using one of the above packages, <strong>then</strong> you have to go with updating the file in Excel. I had to do so because I had no easy way to include Visual Basic macros and very specific formatting specified by a client. And sometimes it is just easier to visually setup a spreadsheet and then just fill the cells programmatically. But this was all done on Windows. </p> <p>If you really have to drive Excel on Mac, because you need to use existing files as templates, I suggest you look at Applescript. Or, if it is an option, look at OpenOffice/LibreOffice <a href="http://wiki.openoffice.org/wiki/Python" rel="nofollow">PyUno</a> interface.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload