velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Saad Zia" <s...@globalnorthstar.com>
Subject RE: problem with velocity in Excel -- help
Date Wed, 08 Dec 2004 16:54:49 GMT
Thx. That was gonna be the second option, which looks like to have been made
the first option :)

-----Original Message-----
From: Simon Christian [mailto:simon@stoutstick.com]
Sent: Wednesday, December 08, 2004 9:37 PM
To: Velocity Users List
Subject: Re: problem with velocity in Excel -- help


Wow.. To get this straight, you've created a 'template' within Excel,
saved it as a file and are now trying to render it through Velocity?

I think that's a real non-starter. Excel is a binary format, and
Velocity doesn't really 'do' binary (it may be possible but hardly the
norm). Try opening your Excel file in a text editor to get a feel of
what it looks like to Velocity.

Perhaps you'd be better off generating a CSV or SYLK file instead, or
even HTML/XML but forcing the browser to open it in Excel.

- simon


Saad Zia wrote:
> Hi.
>
> I am experiencing a problem when using the following code in Excel :
>
> #foreach ($fnc in $fncmap)
> $fnc.Name
> #end
>
> Using the above code in a .rtf file generates correctly, even with the
> new-line indentations.
>
> However, when I place these lines in seperate cells in an Excel sheet,
like
> so :
>
>
>
>
> it generates an error :
>
> org.apache.velocity.exception.ParseErrorException: Lexical error:
> org.apache.vel
> ocity.runtime.parser.TokenMgrError: Lexical error at line 1, column 7.
> Encounte
> red: <EOF> after : ""
>
>         at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
> .java:210)
>         at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
> 95)
>         at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:247)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:193)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:256)
>         at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
> t.invokeNext(StandardPipeline.java:643)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:480)
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> alve.java:191)
>         at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
> t.invokeNext(StandardPipeline.java:643)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:480)
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
>         at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
> 2422)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> ava:180)
>         at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
> t.invokeNext(StandardPipeline.java:643)
>         at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
> rValve.java:171)
>         at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
> t.invokeNext(StandardPipeline.java:641)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> ava:163)
>         at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
> t.invokeNext(StandardPipeline.java:641)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:480)
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> ve.java:174)
>         at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
> t.invokeNext(StandardPipeline.java:643)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:480)
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
>         at
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:19
> 9)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :828)
>         at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
> ssConnection(Http11Protocol.java:700)
>         at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
> :584)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
> ool.java:683)
>         at java.lang.Thread.run(Thread.java:534)
> Report: ERROR endElement() <add>
> org.apache.velocity.exception.ParseErrorExcepti
> on: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError:
Lexical
> err
> or at line 1, column 7.  Encountered: <EOF> after : ""
>
> any ideas of this ?? my guess is that it is generating an error since the
> code-tags have been placed in seperate cells. If I write it as a whole in
a
> single cell, it generates perfectly, but all the values are concatenated
and
> shown in that individual cell. I wish to show he values row-by-row. Any
> ideas ??
>
> thx.
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message