pyXLWriter - grid lines and if formula

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Luis P. Mendes

    #1

    pyXLWriter - grid lines and if formula

    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
  • Gregory Piñero

    #2
    Re: pyXLWriter - grid lines and if formula

    On 7/7/06, Luis P. Mendes <luis_lupe2XXX@ netvisaoxxx.ptw rote:
    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

    Comment

    • John Machin

      #3
      Re: pyXLWriter - grid lines and if formula

      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

      Comment

      • Luis P. Mendes

        #4
        Re: pyXLWriter - grid lines and if formula

        Gregory Piñero escreveu:
        On 7/7/06, Luis P. Mendes <luis_lupe2XXX@ netvisaoxxx.ptw rote:
        >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

        Comment

        • Waldemar Osuch

          #5
          Re: pyXLWriter - grid lines and if formula

          Luis P. Mendes wrote:
          Gregory Piñero escreveu:
          On 7/7/06, Luis P. Mendes <luis_lupe2XXX@ netvisaoxxx.ptw rote:
          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;file name=report.xls

          Lookup documentation on how to generate formula:
          http://msdn.microsoft.com/library/de...ml/ofxml2k.asp

          Waldemar

          Comment

          • Luis P. Mendes

            #6
            Re: pyXLWriter - grid lines and if formula

            Waldemar Osuch escreveu:
            Luis P. Mendes wrote:
            >Gregory Piñero escreveu:
            >>On 7/7/06, Luis P. Mendes <luis_lupe2XXX@ netvisaoxxx.ptw rote:
            >>>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;file name=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

            Comment

            Working...