#114 Want to edit XLS.PY converter

Indexer (49)

In a Windows environment, the CATDOC program xls2csv, doesn't work if it's merely in the system path. It throws up an error about missing parts, which are in its subfolder. But it works correctly from outside its folder if you point to it directly from a DOS prompt: c:\myfolder\xls2csv.exe. So it should also work within XLS.PY if I can insert my full path: c://myfolder//xls2csv.exe.

I tried to edit XLS.PY in the converters folder, but after restarting Plone, there's no updated PYC. I just need a hint about how to tweak the code. Thanks.


  • Andreas Jung

    Andreas Jung - 2009-12-05

    No idea what you are talking about. Having the related converts inside the PATH should be fine and does work. If you have a patch for xls.py, please send it to me

  • Dan

    Dan - 2009-12-07

    XLS.PY with explicit path on line 37

  • Dan

    Dan - 2009-12-07

    Here's the modified xls.py, line 37 now has an explicit path for xls2csv.exe.

    Without the explicit path, I get an error at the command line:
    Cannot load charset cp866 - file not found
    Cannot load target charset cp866

  • Andreas Jung

    Andreas Jung - 2009-12-08

    This patch makes no sense. Having the executables within the $PATH is working - even on Windows.
    There is no general problem with the code. It is in production for years - even on Windows. And hardcoding paths is totally unacceptable..

  • Andreas Jung

    Andreas Jung - 2009-12-08
    • status: open --> open-rejected
  • Andreas Jung

    Andreas Jung - 2009-12-08
    • status: open-rejected --> closed-rejected
  • Dan

    Dan - 2009-12-18

    I am in absolute agreement that a hardcoded path is a terrible solution. But it solved my problem. I downloaded 3.2.17, fixed the path in xls.py to c://catdoc/xls2csv, ran setup.py, and I now get indexing of Excel spreadsheets.

    The problem is catdoc, or at least my version of it, attempted on several Windows computers. To reproduce the problem, execute XLS2CSV.EXE from a prompt, after putting it in your path. It runs, but with an error, perhaps because many of the files it needs are not in that path, they are in a subfolder of catdoc. Point to it directly and it works fine (c:\catdoc\xls2csv.exe)

    Anyway, thanks for taking a look at this. I have a kludgy fix, but it works.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks