Re: to-xls-converter

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: to-xls-converter

Zdeněk Hřib
This is just a test.

----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: "Zdeněk Hřib" <[hidden email]>
Sent: Friday, April 28, 2006 8:17 PM
Subject: Re: [ops-users] to-xls-converter


> Hi Zdenek,
>
> On 4/28/06, Zdeněk Hřib <[hidden email]> wrote:
> > I have sent it to [hidden email] with subject "Re: [ops-users]
> > to-xls-converter" on 2006-04-26.
>
> Somehow the message didn't go through. I didn't receive it, and can't
> find it in the archive:
> http://mail-archive.objectweb.org/ops-users/2006-04/mail1.html
>
> I am looking at the subscribers list and don't see your email in
> there. So I just added you as I assume you want to be subscribed to
> the list (of course feel free to unsubscribe at any time).
>
> > The question is, if the xpath expressions should not be contained
directly
> > in cell values instead of comments, because of the hidden sheet the
> > recreation of the XML will still be possible. We have already
implemented
> > XML2XLS with this method and I think we could contribute also XLS2XML
part

> > after some time (2 months).
>
> The XPath expression could be in the cell value. The benefit of having
> it in the comment is that when you edit the "template" you can have in
> the cell value something that looks like the final result. You can
> have a number where in the result you will want to have a number. You
> can set the appropriate formatting rule and see the result right away.
>
> Of course, if you have improvements to the Excel processors, we will
> be happy to roll them in the project codebase. The best way it to
> contribute changes is to send the files you have modified as an
> attachment to an email in the ops-users list.
>
> Alex
> --
> Blog (XML, Web apps, Open Source):
> http://www.orbeon.com/blog/
>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: to-xls-converter

Zdeněk Hřib
Yes, this works fine now.

About the to-xls-converter. The XML2XLS part is absolutely clear to me, I
have no questions about that. The only problem I can see now is about the
reconstruction of the XML from XLS. If we will have the hidden sheet in the
XLS workbook with all the rows as they were in the visible sheet in the
moment of generation, if someone changes some values it will be easy to
recreate the XML with changed values. But what if someone will add some new
rows. Should the XLS2XML process try to search for any added lines below the
originally created lines in XML2XLS process ? Do we have to replicate the
rows at all in the hidden sheet ?

zdenek


----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: <[hidden email]>
Sent: Thursday, May 04, 2006 2:47 AM
Subject: Re: [ops-users] to-xls-converter


> Hi Zdenek,
>
> I got your test email in the list. So everything seems to work fine now
:).

>
> Alex
>
> On 5/2/06, Zdeněk Hřib <[hidden email]> wrote:
> > This is just a test.
> >
> > ----- Original Message -----
> > From: "Alessandro Vernet" <[hidden email]>
> > To: "Zdeněk Hřib" <[hidden email]>
> > Sent: Friday, April 28, 2006 8:17 PM
> > Subject: Re: [ops-users] to-xls-converter
> >
> >
> > > Hi Zdenek,
> > >
> > > On 4/28/06, Zdeněk Hřib <[hidden email]> wrote:
> > > > I have sent it to [hidden email] with subject "Re:
[ops-users]

> > > > to-xls-converter" on 2006-04-26.
> > >
> > > Somehow the message didn't go through. I didn't receive it, and can't
> > > find it in the archive:
> > > http://mail-archive.objectweb.org/ops-users/2006-04/mail1.html
> > >
> > > I am looking at the subscribers list and don't see your email in
> > > there. So I just added you as I assume you want to be subscribed to
> > > the list (of course feel free to unsubscribe at any time).
> > >
> > > > The question is, if the xpath expressions should not be contained
> > directly
> > > > in cell values instead of comments, because of the hidden sheet the
> > > > recreation of the XML will still be possible. We have already
> > implemented
> > > > XML2XLS with this method and I think we could contribute also
XLS2XML

> > part
> > > > after some time (2 months).
> > >
> > > The XPath expression could be in the cell value. The benefit of having
> > > it in the comment is that when you edit the "template" you can have in
> > > the cell value something that looks like the final result. You can
> > > have a number where in the result you will want to have a number. You
> > > can set the appropriate formatting rule and see the result right away.
> > >
> > > Of course, if you have improvements to the Excel processors, we will
> > > be happy to roll them in the project codebase. The best way it to
> > > contribute changes is to send the files you have modified as an
> > > attachment to an email in the ops-users list.
> > >
> > > Alex
> > > --
> > > Blog (XML, Web apps, Open Source):
> > > http://www.orbeon.com/blog/
> > >
> >
> >
> >
> >
> >
> > --
> > You receive this message as a subscriber of the [hidden email]
mailing list.

> > To unsubscribe: mailto:[hidden email]
> > For general help: mailto:[hidden email]?subject=help
> > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >
> >
> >
>
>
> --
> Blog (XML, Web apps, Open Source):
> http://www.orbeon.com/blog/
>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: to-xls-converter

Alessandro  Vernet
Administrator
Hi Zdenek,

Good question. What happens if someone adds lines in the generated
Excel file? For the lines that are just modified, we have an XPath
expression, but not for those added. Let's say there is a repetition
on employees and 2 lines are generated in the Excel file:

John
Jane

Now the end-user in Excel adds a 3rd line with Tom. When we import the
file we don't know that Tom corresponds to a 3rd employee. It could
have been there in the original Excel file as a static value. I can't
think of any simple way to solve this problem.

Alex

On 5/4/06, Zdeněk Hřib <[hidden email]> wrote:

> Yes, this works fine now.
>
> About the to-xls-converter. The XML2XLS part is absolutely clear to me, I
> have no questions about that. The only problem I can see now is about the
> reconstruction of the XML from XLS. If we will have the hidden sheet in the
> XLS workbook with all the rows as they were in the visible sheet in the
> moment of generation, if someone changes some values it will be easy to
> recreate the XML with changed values. But what if someone will add some new
> rows. Should the XLS2XML process try to search for any added lines below the
> originally created lines in XML2XLS process ? Do we have to replicate the
> rows at all in the hidden sheet ?
>
> zdenek
>
>
> ----- Original Message -----
> From: "Alessandro Vernet" <[hidden email]>
> To: <[hidden email]>
> Sent: Thursday, May 04, 2006 2:47 AM
> Subject: Re: [ops-users] to-xls-converter
>
>
> > Hi Zdenek,
> >
> > I got your test email in the list. So everything seems to work fine now
> :).
> >
> > Alex
> >
> > On 5/2/06, Zdeněk Hřib <[hidden email]> wrote:
> > > This is just a test.
> > >
> > > ----- Original Message -----
> > > From: "Alessandro Vernet" <[hidden email]>
> > > To: "Zdeněk Hřib" <[hidden email]>
> > > Sent: Friday, April 28, 2006 8:17 PM
> > > Subject: Re: [ops-users] to-xls-converter
> > >
> > >
> > > > Hi Zdenek,
> > > >
> > > > On 4/28/06, Zdeněk Hřib <[hidden email]> wrote:
> > > > > I have sent it to [hidden email] with subject "Re:
> [ops-users]
> > > > > to-xls-converter" on 2006-04-26.
> > > >
> > > > Somehow the message didn't go through. I didn't receive it, and can't
> > > > find it in the archive:
> > > > http://mail-archive.objectweb.org/ops-users/2006-04/mail1.html
> > > >
> > > > I am looking at the subscribers list and don't see your email in
> > > > there. So I just added you as I assume you want to be subscribed to
> > > > the list (of course feel free to unsubscribe at any time).
> > > >
> > > > > The question is, if the xpath expressions should not be contained
> > > directly
> > > > > in cell values instead of comments, because of the hidden sheet the
> > > > > recreation of the XML will still be possible. We have already
> > > implemented
> > > > > XML2XLS with this method and I think we could contribute also
> XLS2XML
> > > part
> > > > > after some time (2 months).
> > > >
> > > > The XPath expression could be in the cell value. The benefit of having
> > > > it in the comment is that when you edit the "template" you can have in
> > > > the cell value something that looks like the final result. You can
> > > > have a number where in the result you will want to have a number. You
> > > > can set the appropriate formatting rule and see the result right away.
> > > >
> > > > Of course, if you have improvements to the Excel processors, we will
> > > > be happy to roll them in the project codebase. The best way it to
> > > > contribute changes is to send the files you have modified as an
> > > > attachment to an email in the ops-users list.
> > > >
> > > > Alex
> > > > --
> > > > Blog (XML, Web apps, Open Source):
> > > > http://www.orbeon.com/blog/
> > > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > You receive this message as a subscriber of the [hidden email]
> mailing list.
> > > To unsubscribe: mailto:[hidden email]
> > > For general help: mailto:[hidden email]?subject=help
> > > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> > >
> > >
> > >
> >
> >
> > --
> > Blog (XML, Web apps, Open Source):
> > http://www.orbeon.com/blog/
> >
>
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: to-xls-converter

Zdeněk Hřib
possibly we could have some switch, allowing to specify the behavior in the
XPL:

a) ignore the added lines, import only the originally exported lines
b) import all the lines below the exported lines, until empty row is reached

z.

----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: <[hidden email]>
Sent: Saturday, May 06, 2006 2:42 AM
Subject: Re: [ops-users] to-xls-converter


> Hi Zdenek,
>
> Good question. What happens if someone adds lines in the generated
> Excel file? For the lines that are just modified, we have an XPath
> expression, but not for those added. Let's say there is a repetition
> on employees and 2 lines are generated in the Excel file:
>
> John
> Jane
>
> Now the end-user in Excel adds a 3rd line with Tom. When we import the
> file we don't know that Tom corresponds to a 3rd employee. It could
> have been there in the original Excel file as a static value. I can't
> think of any simple way to solve this problem.
>
> Alex
>
> On 5/4/06, Zdeněk Hřib <[hidden email]> wrote:
> > Yes, this works fine now.
> >
> > About the to-xls-converter. The XML2XLS part is absolutely clear to me,
I
> > have no questions about that. The only problem I can see now is about
the
> > reconstruction of the XML from XLS. If we will have the hidden sheet in
the
> > XLS workbook with all the rows as they were in the visible sheet in the
> > moment of generation, if someone changes some values it will be easy to
> > recreate the XML with changed values. But what if someone will add some
new
> > rows. Should the XLS2XML process try to search for any added lines below
the
> > originally created lines in XML2XLS process ? Do we have to replicate
the

> > rows at all in the hidden sheet ?
> >
> > zdenek
> >
> >
> > ----- Original Message -----
> > From: "Alessandro Vernet" <[hidden email]>
> > To: <[hidden email]>
> > Sent: Thursday, May 04, 2006 2:47 AM
> > Subject: Re: [ops-users] to-xls-converter
> >
> >
> > > Hi Zdenek,
> > >
> > > I got your test email in the list. So everything seems to work fine
now

> > :).
> > >
> > > Alex
> > >
> > > On 5/2/06, Zdeněk Hřib <[hidden email]> wrote:
> > > > This is just a test.
> > > >
> > > > ----- Original Message -----
> > > > From: "Alessandro Vernet" <[hidden email]>
> > > > To: "Zdeněk Hřib" <[hidden email]>
> > > > Sent: Friday, April 28, 2006 8:17 PM
> > > > Subject: Re: [ops-users] to-xls-converter
> > > >
> > > >
> > > > > Hi Zdenek,
> > > > >
> > > > > On 4/28/06, Zdeněk Hřib <[hidden email]> wrote:
> > > > > > I have sent it to [hidden email] with subject "Re:
> > [ops-users]
> > > > > > to-xls-converter" on 2006-04-26.
> > > > >
> > > > > Somehow the message didn't go through. I didn't receive it, and
can't
> > > > > find it in the archive:
> > > > > http://mail-archive.objectweb.org/ops-users/2006-04/mail1.html
> > > > >
> > > > > I am looking at the subscribers list and don't see your email in
> > > > > there. So I just added you as I assume you want to be subscribed
to
> > > > > the list (of course feel free to unsubscribe at any time).
> > > > >
> > > > > > The question is, if the xpath expressions should not be
contained
> > > > directly
> > > > > > in cell values instead of comments, because of the hidden sheet
the
> > > > > > recreation of the XML will still be possible. We have already
> > > > implemented
> > > > > > XML2XLS with this method and I think we could contribute also
> > XLS2XML
> > > > part
> > > > > > after some time (2 months).
> > > > >
> > > > > The XPath expression could be in the cell value. The benefit of
having
> > > > > it in the comment is that when you edit the "template" you can
have in
> > > > > the cell value something that looks like the final result. You can
> > > > > have a number where in the result you will want to have a number.
You
> > > > > can set the appropriate formatting rule and see the result right
away.
> > > > >
> > > > > Of course, if you have improvements to the Excel processors, we
will

> > > > > be happy to roll them in the project codebase. The best way it to
> > > > > contribute changes is to send the files you have modified as an
> > > > > attachment to an email in the ops-users list.
> > > > >
> > > > > Alex
> > > > > --
> > > > > Blog (XML, Web apps, Open Source):
> > > > > http://www.orbeon.com/blog/
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > You receive this message as a subscriber of the
[hidden email]
> > mailing list.
> > > > To unsubscribe: mailto:[hidden email]
> > > > For general help: mailto:[hidden email]?subject=help
> > > > ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws

> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Blog (XML, Web apps, Open Source):
> > > http://www.orbeon.com/blog/
> > >
> >
> >
> >
> >
> >
> > --
> > You receive this message as a subscriber of the [hidden email]
mailing list.

> > To unsubscribe: mailto:[hidden email]
> > For general help: mailto:[hidden email]?subject=help
> > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >
> >
> >
>
>
> --
> Blog (XML, Web apps, Open Source):
> http://www.orbeon.com/blog/
>

----------------------------------------------------------------------------
----


>
> --
> You receive this message as a subscriber of the [hidden email]
mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: to-xls-converter

Alessandro  Vernet
Administrator
Hi Zdenek,

I guess a solution like the one you describe would be acceptable.

Alex

On 5/9/06, Zdeněk Hřib <[hidden email]> wrote:

> possibly we could have some switch, allowing to specify the behavior in the
> XPL:
>
> a) ignore the added lines, import only the originally exported lines
> b) import all the lines below the exported lines, until empty row is reached
>
> z.
>
> ----- Original Message -----
> From: "Alessandro Vernet" <[hidden email]>
> To: <[hidden email]>
> Sent: Saturday, May 06, 2006 2:42 AM
> Subject: Re: [ops-users] to-xls-converter
>
>
> > Hi Zdenek,
> >
> > Good question. What happens if someone adds lines in the generated
> > Excel file? For the lines that are just modified, we have an XPath
> > expression, but not for those added. Let's say there is a repetition
> > on employees and 2 lines are generated in the Excel file:
> >
> > John
> > Jane
> >
> > Now the end-user in Excel adds a 3rd line with Tom. When we import the
> > file we don't know that Tom corresponds to a 3rd employee. It could
> > have been there in the original Excel file as a static value. I can't
> > think of any simple way to solve this problem.
> >
> > Alex
> >
> > On 5/4/06, Zdeněk Hřib <[hidden email]> wrote:
> > > Yes, this works fine now.
> > >
> > > About the to-xls-converter. The XML2XLS part is absolutely clear to me,
> I
> > > have no questions about that. The only problem I can see now is about
> the
> > > reconstruction of the XML from XLS. If we will have the hidden sheet in
> the
> > > XLS workbook with all the rows as they were in the visible sheet in the
> > > moment of generation, if someone changes some values it will be easy to
> > > recreate the XML with changed values. But what if someone will add some
> new
> > > rows. Should the XLS2XML process try to search for any added lines below
> the
> > > originally created lines in XML2XLS process ? Do we have to replicate
> the
> > > rows at all in the hidden sheet ?
> > >
> > > zdenek
> > >
> > >
> > > ----- Original Message -----
> > > From: "Alessandro Vernet" <[hidden email]>
> > > To: <[hidden email]>
> > > Sent: Thursday, May 04, 2006 2:47 AM
> > > Subject: Re: [ops-users] to-xls-converter
> > >
> > >
> > > > Hi Zdenek,
> > > >
> > > > I got your test email in the list. So everything seems to work fine
> now
> > > :).
> > > >
> > > > Alex
> > > >
> > > > On 5/2/06, Zdeněk Hřib <[hidden email]> wrote:
> > > > > This is just a test.
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Alessandro Vernet" <[hidden email]>
> > > > > To: "Zdeněk Hřib" <[hidden email]>
> > > > > Sent: Friday, April 28, 2006 8:17 PM
> > > > > Subject: Re: [ops-users] to-xls-converter
> > > > >
> > > > >
> > > > > > Hi Zdenek,
> > > > > >
> > > > > > On 4/28/06, Zdeněk Hřib <[hidden email]> wrote:
> > > > > > > I have sent it to [hidden email] with subject "Re:
> > > [ops-users]
> > > > > > > to-xls-converter" on 2006-04-26.
> > > > > >
> > > > > > Somehow the message didn't go through. I didn't receive it, and
> can't
> > > > > > find it in the archive:
> > > > > > http://mail-archive.objectweb.org/ops-users/2006-04/mail1.html
> > > > > >
> > > > > > I am looking at the subscribers list and don't see your email in
> > > > > > there. So I just added you as I assume you want to be subscribed
> to
> > > > > > the list (of course feel free to unsubscribe at any time).
> > > > > >
> > > > > > > The question is, if the xpath expressions should not be
> contained
> > > > > directly
> > > > > > > in cell values instead of comments, because of the hidden sheet
> the
> > > > > > > recreation of the XML will still be possible. We have already
> > > > > implemented
> > > > > > > XML2XLS with this method and I think we could contribute also
> > > XLS2XML
> > > > > part
> > > > > > > after some time (2 months).
> > > > > >
> > > > > > The XPath expression could be in the cell value. The benefit of
> having
> > > > > > it in the comment is that when you edit the "template" you can
> have in
> > > > > > the cell value something that looks like the final result. You can
> > > > > > have a number where in the result you will want to have a number.
> You
> > > > > > can set the appropriate formatting rule and see the result right
> away.
> > > > > >
> > > > > > Of course, if you have improvements to the Excel processors, we
> will
> > > > > > be happy to roll them in the project codebase. The best way it to
> > > > > > contribute changes is to send the files you have modified as an
> > > > > > attachment to an email in the ops-users list.
> > > > > >
> > > > > > Alex
> > > > > > --
> > > > > > Blog (XML, Web apps, Open Source):
> > > > > > http://www.orbeon.com/blog/
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > You receive this message as a subscriber of the
> [hidden email]
> > > mailing list.
> > > > > To unsubscribe: mailto:[hidden email]
> > > > > For general help: mailto:[hidden email]?subject=help
> > > > > ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Blog (XML, Web apps, Open Source):
> > > > http://www.orbeon.com/blog/
> > > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > You receive this message as a subscriber of the [hidden email]
> mailing list.
> > > To unsubscribe: mailto:[hidden email]
> > > For general help: mailto:[hidden email]?subject=help
> > > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> > >
> > >
> > >
> >
> >
> > --
> > Blog (XML, Web apps, Open Source):
> > http://www.orbeon.com/blog/
> >
>
>
> ----------------------------------------------------------------------------
> ----
>
>
> >
> > --
> > You receive this message as a subscriber of the [hidden email]
> mailing list.
> > To unsubscribe: mailto:[hidden email]
> > For general help: mailto:[hidden email]?subject=help
> > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >
>
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: to-xls-converter

Zdeněk Hřib
Sorry for this very late answer. So far I have found that
1. POI (http://jakarta.apache.org/poi/hssf/index.html) does not support
reading/writing comments on cells at all
2. generating XLS with POI is quite slow and memory consuming (probably
because of the amount of generated XPath queries - even if thay are cached,
each is different so they are not reused)

Therefore, because I needed only creating of XLS and not the other way, I
decided to generate XML in the Excel 2003 format (you can get a sample of
any Excel pattern if you save your workbook as XML but I do not think it is
properly documented anywhere). If I send it to the browsed with apropriate
MIME and if I set the attachement filename extension to XLS, I got exactly
the results I want.

so I create an XML in the Excel 2003 format with oxf:xslt processor, then I
use the XML converter

<p:processor name="oxf:xml-converter">
      <p:input name="config">
        <config>
          <version>1.0</version>
          <encoding>utf-8</encoding>
        </config>
      </p:input>
      <p:input name="data" href="#html-data"/>
      <p:output name="data" id="xls-binary"/>
    </p:processor>


then just serialize it:


    <p:processor name="oxf:http-serializer">
      <p:input name="data" href="#xls-binary"/>
      <p:input name="config">
        <config>
          <content-type>application/vnd.ms-excel</content-type>
          <force-content-type>true</force-content-type>
          <header>
            <name>Content-Disposition</name>
            <value>attachment; filename=result.xls</value>
          </header>
        </config>
      </p:input>
    </p:processor>

and it is done. quite fast and lightweigth.

----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, May 17, 2006 1:12 AM
Subject: Re: [ops-users] to-xls-converter


> Hi Zdenek,
>
> I guess a solution like the one you describe would be acceptable.
>
> Alex
>
> On 5/9/06, Zdeněk Hřib <[hidden email]> wrote:
> > possibly we could have some switch, allowing to specify the behavior in
the
> > XPL:
> >
> > a) ignore the added lines, import only the originally exported lines
> > b) import all the lines below the exported lines, until empty row is
reached

> >
> > z.
> >
> > ----- Original Message -----
> > From: "Alessandro Vernet" <[hidden email]>
> > To: <[hidden email]>
> > Sent: Saturday, May 06, 2006 2:42 AM
> > Subject: Re: [ops-users] to-xls-converter
> >
> >
> > > Hi Zdenek,
> > >
> > > Good question. What happens if someone adds lines in the generated
> > > Excel file? For the lines that are just modified, we have an XPath
> > > expression, but not for those added. Let's say there is a repetition
> > > on employees and 2 lines are generated in the Excel file:
> > >
> > > John
> > > Jane
> > >
> > > Now the end-user in Excel adds a 3rd line with Tom. When we import the
> > > file we don't know that Tom corresponds to a 3rd employee. It could
> > > have been there in the original Excel file as a static value. I can't
> > > think of any simple way to solve this problem.
> > >
> > > Alex
> > >
> > > On 5/4/06, Zdeněk Hřib <[hidden email]> wrote:
> > > > Yes, this works fine now.
> > > >
> > > > About the to-xls-converter. The XML2XLS part is absolutely clear to
me,
> > I
> > > > have no questions about that. The only problem I can see now is
about
> > the
> > > > reconstruction of the XML from XLS. If we will have the hidden sheet
in
> > the
> > > > XLS workbook with all the rows as they were in the visible sheet in
the
> > > > moment of generation, if someone changes some values it will be easy
to
> > > > recreate the XML with changed values. But what if someone will add
some
> > new
> > > > rows. Should the XLS2XML process try to search for any added lines
below
> > the
> > > > originally created lines in XML2XLS process ? Do we have to
replicate

> > the
> > > > rows at all in the hidden sheet ?
> > > >
> > > > zdenek
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Alessandro Vernet" <[hidden email]>
> > > > To: <[hidden email]>
> > > > Sent: Thursday, May 04, 2006 2:47 AM
> > > > Subject: Re: [ops-users] to-xls-converter
> > > >
> > > >
> > > > > Hi Zdenek,
> > > > >
> > > > > I got your test email in the list. So everything seems to work
fine

> > now
> > > > :).
> > > > >
> > > > > Alex
> > > > >
> > > > > On 5/2/06, Zdeněk Hřib <[hidden email]> wrote:
> > > > > > This is just a test.
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: "Alessandro Vernet" <[hidden email]>
> > > > > > To: "Zdeněk Hřib" <[hidden email]>
> > > > > > Sent: Friday, April 28, 2006 8:17 PM
> > > > > > Subject: Re: [ops-users] to-xls-converter
> > > > > >
> > > > > >
> > > > > > > Hi Zdenek,
> > > > > > >
> > > > > > > On 4/28/06, Zdeněk Hřib <[hidden email]> wrote:
> > > > > > > > I have sent it to [hidden email] with subject "Re:
> > > > [ops-users]
> > > > > > > > to-xls-converter" on 2006-04-26.
> > > > > > >
> > > > > > > Somehow the message didn't go through. I didn't receive it,
and
> > can't
> > > > > > > find it in the archive:
> > > > > > > http://mail-archive.objectweb.org/ops-users/2006-04/mail1.html
> > > > > > >
> > > > > > > I am looking at the subscribers list and don't see your email
in
> > > > > > > there. So I just added you as I assume you want to be
subscribed
> > to
> > > > > > > the list (of course feel free to unsubscribe at any time).
> > > > > > >
> > > > > > > > The question is, if the xpath expressions should not be
> > contained
> > > > > > directly
> > > > > > > > in cell values instead of comments, because of the hidden
sheet
> > the
> > > > > > > > recreation of the XML will still be possible. We have
already
> > > > > > implemented
> > > > > > > > XML2XLS with this method and I think we could contribute
also
> > > > XLS2XML
> > > > > > part
> > > > > > > > after some time (2 months).
> > > > > > >
> > > > > > > The XPath expression could be in the cell value. The benefit
of
> > having
> > > > > > > it in the comment is that when you edit the "template" you can
> > have in
> > > > > > > the cell value something that looks like the final result. You
can
> > > > > > > have a number where in the result you will want to have a
number.
> > You
> > > > > > > can set the appropriate formatting rule and see the result
right
> > away.
> > > > > > >
> > > > > > > Of course, if you have improvements to the Excel processors,
we
> > will
> > > > > > > be happy to roll them in the project codebase. The best way it
to
> > > > > > > contribute changes is to send the files you have modified as
an

> > > > > > > attachment to an email in the ops-users list.
> > > > > > >
> > > > > > > Alex
> > > > > > > --
> > > > > > > Blog (XML, Web apps, Open Source):
> > > > > > > http://www.orbeon.com/blog/
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > You receive this message as a subscriber of the
> > [hidden email]
> > > > mailing list.
> > > > > > To unsubscribe: mailto:[hidden email]
> > > > > > For general help: mailto:[hidden email]?subject=help
> > > > > > ObjectWeb mailing lists service home page:
> > http://www.objectweb.org/wws
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Blog (XML, Web apps, Open Source):
> > > > > http://www.orbeon.com/blog/
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > You receive this message as a subscriber of the
[hidden email]
> > mailing list.
> > > > To unsubscribe: mailto:[hidden email]
> > > > For general help: mailto:[hidden email]?subject=help
> > > > ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws

> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Blog (XML, Web apps, Open Source):
> > > http://www.orbeon.com/blog/
> > >
> >
> >
>
> --------------------------------------------------------------------------
--
> > ----
> >
> >
> > >
> > > --
> > > You receive this message as a subscriber of the
[hidden email]
> > mailing list.
> > > To unsubscribe: mailto:[hidden email]
> > > For general help: mailto:[hidden email]?subject=help
> > > ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
> > >
> >
> >
> >
> >
> >
> > --
> > You receive this message as a subscriber of the [hidden email]
mailing list.

> > To unsubscribe: mailto:[hidden email]
> > For general help: mailto:[hidden email]?subject=help
> > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >
> >
> >
>
>
> --
> Blog (XML, Web apps, Open Source):
> http://www.orbeon.com/blog/
>

----------------------------------------------------------------------------
----


>
> --
> You receive this message as a subscriber of the [hidden email]
mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: to-xls-converter

Erik Bruchez
Administrator
Zdenek,

Thanks for this feedback!

We had also fairly positive experiences generating Word documents using
Word 2003's XML format. Even if this is not always easy, it is a joy
compared to producing the binary Word format!

-Erik

Zdeněk Hřib wrote:

> Sorry for this very late answer. So far I have found that
> 1. POI (http://jakarta.apache.org/poi/hssf/index.html) does not support
> reading/writing comments on cells at all
> 2. generating XLS with POI is quite slow and memory consuming (probably
> because of the amount of generated XPath queries - even if thay are cached,
> each is different so they are not reused)
>
> Therefore, because I needed only creating of XLS and not the other way, I
> decided to generate XML in the Excel 2003 format (you can get a sample of
> any Excel pattern if you save your workbook as XML but I do not think it is
> properly documented anywhere). If I send it to the browsed with apropriate
> MIME and if I set the attachement filename extension to XLS, I got exactly
> the results I want.
>
> so I create an XML in the Excel 2003 format with oxf:xslt processor, then I
> use the XML converter
>
> <p:processor name="oxf:xml-converter">
>       <p:input name="config">
>         <config>
>           <version>1.0</version>
>           <encoding>utf-8</encoding>
>         </config>
>       </p:input>
>       <p:input name="data" href="#html-data"/>
>       <p:output name="data" id="xls-binary"/>
>     </p:processor>
>
>
> then just serialize it:
>
>
>     <p:processor name="oxf:http-serializer">
>       <p:input name="data" href="#xls-binary"/>
>       <p:input name="config">
>         <config>
>           <content-type>application/vnd.ms-excel</content-type>
>           <force-content-type>true</force-content-type>
>           <header>
>             <name>Content-Disposition</name>
>             <value>attachment; filename=result.xls</value>
>           </header>
>         </config>
>       </p:input>
>     </p:processor>
>
> and it is done. quite fast and lightweigth.
>
> ----- Original Message -----
> From: "Alessandro Vernet" <[hidden email]>
> To: <[hidden email]>
> Sent: Wednesday, May 17, 2006 1:12 AM
> Subject: Re: [ops-users] to-xls-converter
>
>
>> Hi Zdenek,
>>
>> I guess a solution like the one you describe would be acceptable.
>>
>> Alex
>>
>> On 5/9/06, Zdeněk Hřib <[hidden email]> wrote:
>>> possibly we could have some switch, allowing to specify the behavior in
> the
>>> XPL:
>>>
>>> a) ignore the added lines, import only the originally exported lines
>>> b) import all the lines below the exported lines, until empty row is
> reached
>>> z.
>>>
>>> ----- Original Message -----
>>> From: "Alessandro Vernet" <[hidden email]>
>>> To: <[hidden email]>
>>> Sent: Saturday, May 06, 2006 2:42 AM
>>> Subject: Re: [ops-users] to-xls-converter
>>>
>>>
>>>> Hi Zdenek,
>>>>
>>>> Good question. What happens if someone adds lines in the generated
>>>> Excel file? For the lines that are just modified, we have an XPath
>>>> expression, but not for those added. Let's say there is a repetition
>>>> on employees and 2 lines are generated in the Excel file:
>>>>
>>>> John
>>>> Jane
>>>>
>>>> Now the end-user in Excel adds a 3rd line with Tom. When we import the
>>>> file we don't know that Tom corresponds to a 3rd employee. It could
>>>> have been there in the original Excel file as a static value. I can't
>>>> think of any simple way to solve this problem.
>>>>
>>>> Alex
>>>>
>>>> On 5/4/06, Zdeněk Hřib <[hidden email]> wrote:
>>>>> Yes, this works fine now.
>>>>>
>>>>> About the to-xls-converter. The XML2XLS part is absolutely clear to
> me,
>>> I
>>>>> have no questions about that. The only problem I can see now is
> about
>>> the
>>>>> reconstruction of the XML from XLS. If we will have the hidden sheet
> in
>>> the
>>>>> XLS workbook with all the rows as they were in the visible sheet in
> the
>>>>> moment of generation, if someone changes some values it will be easy
> to
>>>>> recreate the XML with changed values. But what if someone will add
> some
>>> new
>>>>> rows. Should the XLS2XML process try to search for any added lines
> below
>>> the
>>>>> originally created lines in XML2XLS process ? Do we have to
> replicate
>>> the
>>>>> rows at all in the hidden sheet ?
>>>>>
>>>>> zdenek
>>>>>
>>>>>
>>>>> ----- Original Message -----
>>>>> From: "Alessandro Vernet" <[hidden email]>
>>>>> To: <[hidden email]>
>>>>> Sent: Thursday, May 04, 2006 2:47 AM
>>>>> Subject: Re: [ops-users] to-xls-converter
>>>>>
>>>>>
>>>>>> Hi Zdenek,
>>>>>>
>>>>>> I got your test email in the list. So everything seems to work
> fine
>>> now
>>>>> :).
>>>>>> Alex
>>>>>>
>>>>>> On 5/2/06, Zdeněk Hřib <[hidden email]> wrote:
>>>>>>> This is just a test.
>>>>>>>
>>>>>>> ----- Original Message -----
>>>>>>> From: "Alessandro Vernet" <[hidden email]>
>>>>>>> To: "Zdeněk Hřib" <[hidden email]>
>>>>>>> Sent: Friday, April 28, 2006 8:17 PM
>>>>>>> Subject: Re: [ops-users] to-xls-converter
>>>>>>>
>>>>>>>
>>>>>>>> Hi Zdenek,
>>>>>>>>
>>>>>>>> On 4/28/06, Zdeněk Hřib <[hidden email]> wrote:
>>>>>>>>> I have sent it to [hidden email] with subject "Re:
>>>>> [ops-users]
>>>>>>>>> to-xls-converter" on 2006-04-26.
>>>>>>>> Somehow the message didn't go through. I didn't receive it,
> and
>>> can't
>>>>>>>> find it in the archive:
>>>>>>>> http://mail-archive.objectweb.org/ops-users/2006-04/mail1.html
>>>>>>>>
>>>>>>>> I am looking at the subscribers list and don't see your email
> in
>>>>>>>> there. So I just added you as I assume you want to be
> subscribed
>>> to
>>>>>>>> the list (of course feel free to unsubscribe at any time).
>>>>>>>>
>>>>>>>>> The question is, if the xpath expressions should not be
>>> contained
>>>>>>> directly
>>>>>>>>> in cell values instead of comments, because of the hidden
> sheet
>>> the
>>>>>>>>> recreation of the XML will still be possible. We have
> already
>>>>>>> implemented
>>>>>>>>> XML2XLS with this method and I think we could contribute
> also
>>>>> XLS2XML
>>>>>>> part
>>>>>>>>> after some time (2 months).
>>>>>>>> The XPath expression could be in the cell value. The benefit
> of
>>> having
>>>>>>>> it in the comment is that when you edit the "template" you can
>>> have in
>>>>>>>> the cell value something that looks like the final result. You
> can
>>>>>>>> have a number where in the result you will want to have a
> number.
>>> You
>>>>>>>> can set the appropriate formatting rule and see the result
> right
>>> away.
>>>>>>>> Of course, if you have improvements to the Excel processors,
> we
>>> will
>>>>>>>> be happy to roll them in the project codebase. The best way it
> to
>>>>>>>> contribute changes is to send the files you have modified as
> an
>>>>>>>> attachment to an email in the ops-users list.
>>>>>>>>
>>>>>>>> Alex
>>>>>>>> --
>>>>>>>> Blog (XML, Web apps, Open Source):
>>>>>>>> http://www.orbeon.com/blog/
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> You receive this message as a subscriber of the
>>> [hidden email]
>>>>> mailing list.
>>>>>>> To unsubscribe: mailto:[hidden email]
>>>>>>> For general help: mailto:[hidden email]?subject=help
>>>>>>> ObjectWeb mailing lists service home page:
>>> http://www.objectweb.org/wws
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Blog (XML, Web apps, Open Source):
>>>>>> http://www.orbeon.com/blog/
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> You receive this message as a subscriber of the
> [hidden email]
>>> mailing list.
>>>>> To unsubscribe: mailto:[hidden email]
>>>>> For general help: mailto:[hidden email]?subject=help
>>>>> ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
>>>>>
>>>>>
>>>>
>>>> --
>>>> Blog (XML, Web apps, Open Source):
>>>> http://www.orbeon.com/blog/
>>>>
>>>
>> --------------------------------------------------------------------------
> --
>>> ----
>>>
>>>
>>>> --
>>>> You receive this message as a subscriber of the
> [hidden email]
>>> mailing list.
>>>> To unsubscribe: mailto:[hidden email]
>>>> For general help: mailto:[hidden email]?subject=help
>>>> ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
>>>
>>>
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email]
> mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>>
>>>
>>>
>>
>> --
>> Blog (XML, Web apps, Open Source):
>> http://www.orbeon.com/blog/
>>
>
>
> ----------------------------------------------------------------------------
> ----
>
>
>> --
>> You receive this message as a subscriber of the [hidden email]
> mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws