Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > pyXLWriter - grid lines and if formula

Reply
Thread Tools

pyXLWriter - grid lines and if formula

 
 
Luis P. Mendes
Guest
Posts: n/a
 
      07-07-2006
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
 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?Gregory_Pi=F1ero?=
Guest
Posts: n/a
 
      07-07-2006
On 7/7/06, Luis P. Mendes <(E-Mail Removed)> 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.


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
 
Reply With Quote
 
 
 
 
John Machin
Guest
Posts: n/a
 
      07-07-2006
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
 
Reply With Quote
 
Luis P. Mendes
Guest
Posts: n/a
 
      07-09-2006
Gregory Piņero escreveu:
> On 7/7/06, Luis P. Mendes <(E-Mail Removed)> 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.

>
> 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
 
Reply With Quote
 
Waldemar Osuch
Guest
Posts: n/a
 
      07-10-2006
Luis P. Mendes wrote:
> Gregory Piņero escreveu:
> > On 7/7/06, Luis P. Mendes <(E-Mail Removed)> 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.


> 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

 
Reply With Quote
 
Luis P. Mendes
Guest
Posts: n/a
 
      07-10-2006
Waldemar Osuch escreveu:
> Luis P. Mendes wrote:
>> Gregory Piņero escreveu:
>>> On 7/7/06, Luis P. Mendes <(E-Mail Removed)> 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.

>
>> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
pyXLWriter warnings Robert Singer Python 1 09-30-2008 01:59 AM
pyXLwriter and jython elbertlev@hotmail.com Python 0 01-12-2005 10:45 PM
Modems, Analog Lines and ... Electrical Lines? Sens Fan Happy In Ohio Computer Support 5 09-02-2004 04:15 AM
pyXLWriter - simple example code ? Richard Shea Python 2 08-23-2004 10:23 AM
pyXLWriter - cancel previous question Richard Shea Python 0 08-20-2004 08:23 AM



Advertisments