By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,771 Members | 1,709 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,771 IT Pros & Developers. It's quick & easy.

pyXLWriter - grid lines and if formula

P: n/a
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
Jul 7 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On 7/7/06, Luis P. Mendes <lu***********@netvisaoxxx.ptwrote:
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
Jul 7 '06 #2

P: n/a
On 8/07/2006 3:43 AM, Luis P. Mendes wrote:
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
Jul 7 '06 #3

P: n/a
Gregory Piñero escreveu:
On 7/7/06, Luis P. Mendes <lu***********@netvisaoxxx.ptwrote:
>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
I'll try that option and see what I can get.

Still, there's an open patch at
http://sourceforge.net/tracker/index...81&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
Jul 9 '06 #4

P: n/a
Luis P. Mendes wrote:
Gregory Piñero escreveu:
On 7/7/06, Luis P. Mendes <lu***********@netvisaoxxx.ptwrote:
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.
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/de...ml/ofxml2k.asp

Waldemar

Jul 10 '06 #5

P: n/a
Waldemar Osuch escreveu:
Luis P. Mendes wrote:
>Gregory Piñero escreveu:
>>On 7/7/06, Luis P. Mendes <lu***********@netvisaoxxx.ptwrote:
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.
>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/de...ml/ofxml2k.asp

Waldemar
Thanks, but it's a workbook with several sheets.

Luis P. Mendes
Jul 10 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.