You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Pe...@hydro.qc.ca on 2005/11/07 20:18:29 UTC
Question about ##
Hi everyone, I'm using Velocity for generating Excel file. I save my
source file in excel xml format. After that, I add the Velocity tag in
it to be able to parse it. Everything work great eccept the faq that
Excel save the format of a Cell in the format #,##0.0. So Velocity trap
that as a comment and wipe the rest of the line.
The file became a not valid xml after that of course.
So my question is: Is there a way to tell Velocity to not parse the
comment ? Or does exist a way to change the comment sing ? If not,
Someone have a good idea to overcome that issue? I can't espace ## sign
in the template because Excel will not recognize it after that.
Here a example of the tag in problem.
<Style ss:ID="s34">
<Font ss:FontName="Arial Narrow" x:Family="Swiss"/>
<NumberFormat ss:Format="#,##0.0"/>
</Style>
Sorry for the bad english. I'm french.
Thanks everyone for your help. Sorry if the question already been ask. I
search on the archive of the mailing list and found nothing.
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: Question about ##
Posted by Mike Kienenberger <mk...@gmail.com>.
You need to use this:
#set ($h = '#')
<NumberFormat ss:Format="${h},${h}${h}0.0"/>
To be safe, you should always escape # and $ symbols.
On 11/7/05, Pelletier.Carl@hydro.qc.ca <Pe...@hydro.qc.ca> wrote:
> Hi everyone, I'm using Velocity for generating Excel file. I save my
> source file in excel xml format. After that, I add the Velocity tag in
> it to be able to parse it. Everything work great eccept the faq that
> Excel save the format of a Cell in the format #,##0.0. So Velocity trap
> that as a comment and wipe the rest of the line.
>
> The file became a not valid xml after that of course.
>
> So my question is: Is there a way to tell Velocity to not parse the
> comment ? Or does exist a way to change the comment sing ? If not,
> Someone have a good idea to overcome that issue? I can't espace ## sign
> in the template because Excel will not recognize it after that.
>
>
> Here a example of the tag in problem.
>
> <Style ss:ID="s34">
> <Font ss:FontName="Arial Narrow" x:Family="Swiss"/>
> <NumberFormat ss:Format="#,##0.0"/>
> </Style>
>
> Sorry for the bad english. I'm french.
>
>
> Thanks everyone for your help. Sorry if the question already been ask. I
> search on the archive of the mailing list and found nothing.
>
> ---------------------------------------------------------------------
> 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
Re: Question about ##
Posted by Jean Francois Chamard <jf...@interstructure.ca>.
Hi Carl,
just set a variable with ## and echo this variable when you need ##
#set(myChars="##")
Jeff
Pelletier.Carl@hydro.qc.ca wrote:
>Hi everyone, I'm using Velocity for generating Excel file. I save my
>source file in excel xml format. After that, I add the Velocity tag in
>it to be able to parse it. Everything work great eccept the faq that
>Excel save the format of a Cell in the format #,##0.0. So Velocity trap
>that as a comment and wipe the rest of the line.
>
>The file became a not valid xml after that of course.
>
>So my question is: Is there a way to tell Velocity to not parse the
>comment ? Or does exist a way to change the comment sing ? If not,
>Someone have a good idea to overcome that issue? I can't espace ## sign
>in the template because Excel will not recognize it after that.
>
>
>Here a example of the tag in problem.
>
><Style ss:ID="s34">
> <Font ss:FontName="Arial Narrow" x:Family="Swiss"/>
> <NumberFormat ss:Format="#,##0.0"/>
> </Style>
>
>Sorry for the bad english. I'm french.
>
>
>Thanks everyone for your help. Sorry if the question already been ask. I
>search on the archive of the mailing list and found nothing.
>
>---------------------------------------------------------------------
>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