Hi,
I'm trying to create an excel file from a collection of xml. If I understand the process correctly, I collect my xml, and wrap them in workbook and sheet elements. So I have an xslt that produces <workbook> <sheet name="products"> <product><id="a"><price>1</price></product> <product><id="b"><price>2</price></product> </sheet> </workbook> (The reports example has an xhtml page as an intermediary form, but I assume that is unnecessary and only done there because it is a generalized example that can output the report in many forms). And then call the processor <p:processor name="oxf:to-xls-converter"> <p:input name="config"> <config template="file:/www/spreadsheet/products.xls"> <repeat-row row-num="2" for-each="/workbook/sheet/product" /> </config> </p:input> <p:input name="data" href="#data" /> <p:output name="data" id="xls-binary"/> </p:processor> And in my spreadsheet template I have row 1 with two columns Product and Price and row 2, where each column has a custom format General;"id" and General;"price" Presumably I am doing something wrong, because when the pipeline is executed, I get org.orbeon.oxf.processor.serializer.legacy.XLSSerializer readInput XLSSerializer.java 130 You might notice, of course, I am using the old processor, but if I change the processor to xls-serializer I get exactly the same error. In the documentation http://www.orbeon.com/ops/doc/processors-converters#xls-converters one example uses the new processor and the other uses the old one(?). Anyone have any insights? Thanks & regards Colin -- 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 |
Hello All,
I'm still stumped on the attached. If anyone has any comments, they would be much appreciated. Best regards Colin On Jan 30, 2006, at 7:54 PM, Colin O'Brien wrote: > Hi, > > I'm trying to create an excel file from a collection of xml. > > If I understand the process correctly, I collect my xml, and wrap them > in workbook and sheet elements. > So I have an xslt that produces > <workbook> > <sheet name="products"> > <product><id="a"><price>1</price></product> > <product><id="b"><price>2</price></product> > </sheet> > </workbook> > > (The reports example has an xhtml page as an intermediary form, but I > assume that is unnecessary and only done there because it is a > generalized example that can output the report in many forms). > > And then call the processor > <p:processor name="oxf:to-xls-converter"> > <p:input name="config"> > <config template="file:/www/spreadsheet/products.xls"> > <repeat-row row-num="2" for-each="/workbook/sheet/product" /> > </config> > </p:input> > <p:input name="data" href="#data" /> > <p:output name="data" id="xls-binary"/> > </p:processor> > > And in my spreadsheet template I have > row 1 with two columns Product and Price > and row 2, where each column has a custom format > General;"id" and General;"price" > > Presumably I am doing something wrong, because when the pipeline is > executed, I get > > org.orbeon.oxf.processor.serializer.legacy.XLSSerializer readInput > XLSSerializer.java 130 > > You might notice, of course, I am using the old processor, but if I > change the processor to > xls-serializer > I get exactly the same error. > > In the documentation > http://www.orbeon.com/ops/doc/processors-converters#xls-converters > one example uses the new processor and the other uses the old one(?). > > Anyone have any insights? > > Thanks & regards > Colin -- 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 |
Colin,
Have you tried replacing the file: protocol with the oxf: protocol, all the examples use oxf: apart from that it looks like it should work. Ryan Ryan Puddephatt Software Engineer TFX Group - IT UK 1 Michaelson Square Livingston West Lothian Scotand EH54 7DP * [hidden email] ( 01506 407 110 7 01506 407 108 >-----Original Message----- >From: Colin O'Brien [mailto:[hidden email]] >Sent: 03 February 2006 18:56 >To: [hidden email] >Subject: Re: [ops-users] How to deliver excel > >Hello All, > >I'm still stumped on the attached. >If anyone has any comments, they would be much appreciated. > >Best regards >Colin > >On Jan 30, 2006, at 7:54 PM, Colin O'Brien wrote: > >> Hi, >> >> I'm trying to create an excel file from a collection of xml. >> >> If I understand the process correctly, I collect my xml, and wrap them >> in workbook and sheet elements. >> So I have an xslt that produces >> <workbook> >> <sheet name="products"> >> <product><id="a"><price>1</price></product> >> <product><id="b"><price>2</price></product> >> </sheet> >> </workbook> >> >> (The reports example has an xhtml page as an intermediary form, but I >> assume that is unnecessary and only done there because it is a >> generalized example that can output the report in many forms). >> >> And then call the processor >> <p:processor name="oxf:to-xls-converter"> >> <p:input name="config"> >> <config template="file:/www/spreadsheet/products.xls"> >> <repeat-row row-num="2" for-each="/workbook/sheet/product" /> >> </config> >> </p:input> >> <p:input name="data" href="#data" /> >> <p:output name="data" id="xls-binary"/> >> </p:processor> >> >> And in my spreadsheet template I have >> row 1 with two columns Product and Price >> and row 2, where each column has a custom format >> General;"id" and General;"price" >> >> Presumably I am doing something wrong, because when the pipeline is >> executed, I get >> >> org.orbeon.oxf.processor.serializer.legacy.XLSSerializer readInput >> XLSSerializer.java 130 >> >> You might notice, of course, I am using the old processor, but if I >> change the processor to >> xls-serializer >> I get exactly the same error. >> >> In the documentation >> http://www.orbeon.com/ops/doc/processors-converters#xls-converters >> one example uses the new processor and the other uses the old one(?). >> >> Anyone have any insights? >> >> Thanks & regards >> Colin > -- 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 |
Hi Ryan
thanks for pushing me to look at the error message one more time. I wasn't interpreting it as the processor (still) not finding the file - thought I was past that ;-) The file protocol wasn't the issue (my example was simplified from what's actually going on) (though I might mention an inconsistency in the system, that this is the only input uri (I've seen) that needs the full/absolute path when using the file protocol - all others allow relative - and all outputs require the full path - I had been ok with that duality up to now ;-). But I am now running a later build than last time I tried, and so when I caused the pipeline to run one more time, I got a different error. And what was really wrong with my example was >>> <repeat-row row-num="2" for-each="/workbook/sheet/product" /> as you don't need the /worksheet/sheet but what you do need is another wrapper element no leading slash and rows (in the spreadsheet template) are counting from 0, not 1 so it should have read! <repeat-row row-num="1" for-each="products/product" /> Another thing I was missing was that my template spreadsheet needs to have only one sheet in it, and that it should have the same name as used to name the sheet in the processor input data. And so now it works ;-) Best regards Colin On Feb 3, 2006, at 3:07 PM, Ryan Puddephatt wrote: > Colin, > Have you tried replacing the file: protocol with the oxf: protocol, > all the examples use oxf: apart from that it looks like it should work. > > Ryan > > Ryan Puddephatt > Software Engineer > TFX Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotand > EH54 7DP > > * [hidden email] > ( 01506 407 110 > 7 01506 407 108 > >> -----Original Message----- >> From: Colin O'Brien [mailto:[hidden email]] >> Sent: 03 February 2006 18:56 >> To: [hidden email] >> Subject: Re: [ops-users] How to deliver excel >> >> Hello All, >> >> I'm still stumped on the attached. >> If anyone has any comments, they would be much appreciated. >> >> Best regards >> Colin >> >> On Jan 30, 2006, at 7:54 PM, Colin O'Brien wrote: >> >>> Hi, >>> >>> I'm trying to create an excel file from a collection of xml. >>> >>> If I understand the process correctly, I collect my xml, and wrap >>> them >>> in workbook and sheet elements. >>> So I have an xslt that produces >>> <workbook> >>> <sheet name="products"> >>> <product><id="a"><price>1</price></product> >>> <product><id="b"><price>2</price></product> >>> </sheet> >>> </workbook> >>> >>> (The reports example has an xhtml page as an intermediary form, but I >>> assume that is unnecessary and only done there because it is a >>> generalized example that can output the report in many forms). >>> >>> And then call the processor >>> <p:processor name="oxf:to-xls-converter"> >>> <p:input name="config"> >>> <config template="file:/www/spreadsheet/products.xls"> >>> <repeat-row row-num="2" for-each="/workbook/sheet/product" /> >>> </config> >>> </p:input> >>> <p:input name="data" href="#data" /> >>> <p:output name="data" id="xls-binary"/> >>> </p:processor> >>> >>> And in my spreadsheet template I have >>> row 1 with two columns Product and Price >>> and row 2, where each column has a custom format >>> General;"id" and General;"price" >>> >>> Presumably I am doing something wrong, because when the pipeline is >>> executed, I get >>> >>> org.orbeon.oxf.processor.serializer.legacy.XLSSerializer readInput >>> XLSSerializer.java 130 >>> >>> You might notice, of course, I am using the old processor, but if I >>> change the processor to >>> xls-serializer >>> I get exactly the same error. >>> >>> In the documentation >>> http://www.orbeon.com/ops/doc/processors-converters#xls-converters >>> one example uses the new processor and the other uses the old one(?). >>> >>> Anyone have any insights? >>> >>> Thanks & regards >>> Colin >> > > > > > -- > 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 |
Glad you got it sorted!
Ryan Puddephatt Software Engineer TFX Group - IT UK 1 Michaelson Square Livingston West Lothian Scotand EH54 7DP * [hidden email] ( 01506 407 110 7 01506 407 108 >-----Original Message----- >From: Colin O'Brien [mailto:[hidden email]] >Sent: 03 February 2006 22:20 >To: [hidden email] >Subject: Re: [ops-users] How to deliver excel > >Hi Ryan > >thanks for pushing me to look at the error message one more time. >I wasn't interpreting it as the processor (still) not finding the file >- thought I was past that ;-) > >The file protocol wasn't the issue (my example was simplified from >what's actually going on) >(though I might mention an inconsistency in the system, that this is >the only input uri (I've seen) that needs the full/absolute path when >using the file protocol - all others allow relative - and all outputs >require the full path - I had been ok with that duality up to now ;-). > >But I am now running a later build than last time I tried, and so when >I caused the pipeline to run one more time, I got a different error. >And what was really wrong with my example was >>>> <repeat-row row-num="2" for-each="/workbook/sheet/product" /> >as you don't need the /worksheet/sheet >but what you do need is another wrapper element >no leading slash >and rows (in the spreadsheet template) are counting from 0, not 1 >so it should have read! ><repeat-row row-num="1" for-each="products/product" /> > >Another thing I was missing was that my template spreadsheet needs to >have only one sheet in it, and that it should have the same name as >used to name the sheet in the processor input data. > >And so now it works ;-) > >Best regards >Colin > > >On Feb 3, 2006, at 3:07 PM, Ryan Puddephatt wrote: > >> Colin, >> Have you tried replacing the file: protocol with the oxf: protocol, >> all the examples use oxf: apart from that it looks like it should work. >> >> Ryan >> >> Ryan Puddephatt >> Software Engineer >> TFX Group - IT UK >> 1 Michaelson Square >> Livingston >> West Lothian >> Scotand >> EH54 7DP >> >> * [hidden email] >> ( 01506 407 110 >> 7 01506 407 108 >> >>> -----Original Message----- >>> From: Colin O'Brien [mailto:[hidden email]] >>> Sent: 03 February 2006 18:56 >>> To: [hidden email] >>> Subject: Re: [ops-users] How to deliver excel >>> >>> Hello All, >>> >>> I'm still stumped on the attached. >>> If anyone has any comments, they would be much appreciated. >>> >>> Best regards >>> Colin >>> >>> On Jan 30, 2006, at 7:54 PM, Colin O'Brien wrote: >>> >>>> Hi, >>>> >>>> I'm trying to create an excel file from a collection of xml. >>>> >>>> If I understand the process correctly, I collect my xml, and wrap >>>> them >>>> in workbook and sheet elements. >>>> So I have an xslt that produces >>>> <workbook> >>>> <sheet name="products"> >>>> <product><id="a"><price>1</price></product> >>>> <product><id="b"><price>2</price></product> >>>> </sheet> >>>> </workbook> >>>> >>>> (The reports example has an xhtml page as an intermediary form, but I >>>> assume that is unnecessary and only done there because it is a >>>> generalized example that can output the report in many forms). >>>> >>>> And then call the processor >>>> <p:processor name="oxf:to-xls-converter"> >>>> <p:input name="config"> >>>> <config template="file:/www/spreadsheet/products.xls"> >>>> <repeat-row row-num="2" for-each="/workbook/sheet/product" /> >>>> </config> >>>> </p:input> >>>> <p:input name="data" href="#data" /> >>>> <p:output name="data" id="xls-binary"/> >>>> </p:processor> >>>> >>>> And in my spreadsheet template I have >>>> row 1 with two columns Product and Price >>>> and row 2, where each column has a custom format >>>> General;"id" and General;"price" >>>> >>>> Presumably I am doing something wrong, because when the pipeline is >>>> executed, I get >>>> >>>> org.orbeon.oxf.processor.serializer.legacy.XLSSerializer readInput >>>> XLSSerializer.java 130 >>>> >>>> You might notice, of course, I am using the old processor, but if I >>>> change the processor to >>>> xls-serializer >>>> I get exactly the same error. >>>> >>>> In the documentation >>>> http://www.orbeon.com/ops/doc/processors-converters#xls-converters >>>> one example uses the new processor and the other uses the old one(?). >>>> >>>> Anyone have any insights? >>>> >>>> Thanks & regards >>>> Colin >>> >> >> >> >> >> -- >> 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 |
Free forum by Nabble | Edit this page |