pyXLWriter - grid lines and if formula

L

Luis P. Mendes

Hi,

I know that pyExelerator is the supported project now, but I can't use
it because I'd need it to generate files from a web platform. Since I
can not save a file to a file-like object, I have to use pyXLWriter.

The problems are:
1- how to turn off/on the grid lines of each sheet?
2- I tried to build a simple 'if' formula but couldn't. Is it my
problem or pyXLWriter's problem? If the former, is it possible to post
an example?

TIA
Luis P. Mendes
 
?

=?ISO-8859-1?Q?Gregory_Pi=F1ero?=

Hi,

I know that pyExelerator is the supported project now, but I can't use
it because I'd need it to generate files from a web platform. Since I
can not save a file to a file-like object, I have to use pyXLWriter.

I don't really know what I'm talking about, but maybe have a Python
script that uses pyExelerator and saves the file to Sdout, name that
script with an .xls extension and the browser will present it to the
user as an Excel file?

Maybe, maybe??

-Greg pinero
 
J

John Machin

Hi,

I know that pyExelerator is the supported project now, but I can't use
it because I'd need it to generate files from a web platform. Since I
can not save a file to a file-like object, I have to use pyXLWriter.

The problems are:
1- how to turn off/on the grid lines of each sheet?

It is an open source project. When you went to the source directory and
typed:

grep def.*grid *.py

what went wrong?
2- I tried to build a simple 'if' formula but couldn't.

What did you try, and what was the result when you opened the file with
Oo_O Calc / Gnumeric / you-know-what? Have you had success with *any*
formulas that have functions with more than one argument?
Is it my
problem or pyXLWriter's problem?

Given the limited information, certainty is impossible, but I'd say it's
your problem.
If the former, is it possible to post
an example?

It is possible to post an example irrespective of whether it is your
problem or not.

It is also possible to go to the examples directory and type:

grep -i "=if" *.py

HTH,
John
 
L

Luis P. Mendes

Gregory Piñero escreveu:
I don't really know what I'm talking about, but maybe have a Python
script that uses pyExelerator and saves the file to Sdout, name that
script with an .xls extension and the browser will present it to the
user as an Excel file?

Maybe, maybe??

-Greg pinero
I'll try that option and see what I can get.

Still, there's an open patch at
http://sourceforge.net/tracker/index.php?func=detail&aid=1481069&group_id=134081&atid=730645
that says:
"""
Summary: (?)
pass file-like objects to write
In a cgi script you use mosty sys.stdout to write to
the client with this little patch this is possible.
"""
but it has not been submitted yet.

So, perhaps you could show me how to generate an excel file as a http
response in django?

Luis P. Mendes
 
W

Waldemar Osuch

Luis said:
Gregory Piñero escreveu:
So, perhaps you could show me how to generate an excel file as a http
response in django?

If it is a simple one sheet Workbook you can produce HTML document with
a table and set the headers to indicate it is Excel.

Content-Type: application/vnd.ms-excel
Content-Disposition: attachment;filename=report.xls

Lookup documentation on how to generate formula:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoffxml/html/ofxml2k.asp

Waldemar
 
L

Luis P. Mendes

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top