python 操作xls


错误1:

*** formula/tFunc unknown FuncID:186

错误2:

Python XLRD Error : formula/tFunc unknown FuncID:186

解决办法:

For now I just wanted to make sure the xlrd read fine. I hacked my xlrd package so that it loads.

I don't gaurentee the correctness of the output.

Just add the following line in formula.py of your pythonlibs/xlrd package.

Around line 240 where each number is map to a function create a hacked function here. I've inserted 'HACKED' in there. I don't understand exactly what's going on.

-- added the line that starts with 186:

184: ('FACT', 1, 1, 0x02, 1, 'V', 'V'),
186: ('HACKED', 1, 1, 0x02, 1, 'V', 'V'),
189: ('DPRODUCT', 3, 3, 0x02, 3, 'V', 'RRR'),

Here is the discussion by xlrd group. Essentially, this is a complicated problem that can't be resolved. :)

1,找到formula.py文件

    我的是这里:

    C:\Users\Name\Envs\tcweb27\Lib\site-packages

2,186行左右,在文字184和文字189中间加插入一行

        186: ('HACKED', 1, 1, 0x02, 1, 'V', 'V'),

3,运行程序



你可能感兴趣的:(python 操作xls)