PyExcelerator - mishandling of formulas?

M

Marco Aschwanden

Hi,

Yesterday I placed a bug report on PyExcelerators-Sourceforge-page... but
I am not so sure anymore, whether this is really a bug - I could imagine
that I missed something, but I don't see what. Please confirm that my bug
is due to mishandling and I will gladly retreat my bug report.

In a formula, I would like to point to a field on another worksheet.
pyExcelerator chokes on these references!

<example>

import pyExcelerator

wb = pyExcelerator.Workbook()
ws_summary = wb.add_sheet('Summary')
ws_data = wb.add_sheet('Data')

ws_summary.write(0,0, pyExcelerator.Formula('Data:A1')) <--- Here it
chokes!
ws_data.write(0, 0, '4000')

wb.save('not_parsing.xls')

</example>

Is this a bug or am I doing something wrong?

Regards,
Marco
 
S

Serge Orlov

Marco said:
Hi,

Yesterday I placed a bug report on PyExcelerators-Sourceforge-page... but
I am not so sure anymore, whether this is really a bug - I could imagine
that I missed something, but I don't see what. Please confirm that my bug
is due to mishandling and I will gladly retreat my bug report.

In a formula, I would like to point to a field on another worksheet.
pyExcelerator chokes on these references!

<example>

import pyExcelerator

wb = pyExcelerator.Workbook()
ws_summary = wb.add_sheet('Summary')
ws_data = wb.add_sheet('Data')

ws_summary.write(0,0, pyExcelerator.Formula('Data:A1')) <--- Here it
chokes!
ws_data.write(0, 0, '4000')

wb.save('not_parsing.xls')

</example>

Is this a bug or am I doing something wrong?

I think you're doing it wrong. ":" character means range, to refer to a
sheet use "!" charater: Data!A1
 
M

Marco Aschwanden

I think you're doing it wrong. ":" character means range, to refer to a
sheet use "!" charater: Data!A1

Right you are. It "changed" somehow... anyhow, even if you change it, it
will choke on the same line. I received an answer... a workaround which
doesn't make me happy, but it is, as it is!

[...]
This is not a bug. This is by design. pyExcelerator does not
unerstand such syntax. Try Formula("HYPERLINK(address; name)")
[...]

Which means:

ws_summary.write(0,0, pyExcelerator.Formula('HYPERLINK("Data!A1"))

does the trick, but the text shown is a hyperlink now!

Thanks for your help,
Regards,
Marco
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top