Wednesday, March 7, 2012

Export to Excel: Format cells to "Number"

Hi all
When I export my reports to excel, all cells are set to "General" number
style.
Users wanted to show numbers as "Number", but I didn't found the way to set
the cell output style.
Any idea?
Thanks in advance.On Aug 20, 12:57 pm, "David Rodr=EDguez Rinc=F3n" <d_rin...@.hotmail.com>
wrote:
> Hi all
> When I export my reports to excel, all cells are set to "General" number
> style.
> Users wanted to show numbers as "Number", but I didn't found the way to s=et
> the cell output style.
> Any idea?
> Thanks in advance.
Depending on your needs, you may be able to set the field's format
based on what the numbering format needs to be. Maybe something like
one of the following as an expression in the Format property (select
the control -> select the View drop-down list -> Properties Window ->
to the right of Format, select <Expression...>)
#,0
-or-
#,0.00
etc
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Hi Enrique.
First of all, thank you very much for your quick answer
My issue is not related woth the format in the Report Viewer. I can show
data using the correct format.
The problem is in the excel file exported by MS RS, when all the cells are
set as "General" (right click on cell >> Format Cell >> Number Category)
Our users want to set numbers to "Number" category, to be able to apply
formulas to validate data.
I tried your approach, and it works in the Report Viewer, but unfortunatelly
the excel file is exported with no specific cell format :(
Any other suggestion?
Thanks again.
David Rodríguez
"EMartinez" <emartinez.pr1@.gmail.com> wrote in message
news:1187661848.228911.233150@.50g2000hsm.googlegroups.com...
On Aug 20, 12:57 pm, "David Rodríguez Rincón" <d_rin...@.hotmail.com>
wrote:
> Hi all
> When I export my reports to excel, all cells are set to "General" number
> style.
> Users wanted to show numbers as "Number", but I didn't found the way to
> set
> the cell output style.
> Any idea?
> Thanks in advance.
Depending on your needs, you may be able to set the field's format
based on what the numbering format needs to be. Maybe something like
one of the following as an expression in the Format property (select
the control -> select the View drop-down list -> Properties Window ->
to the right of Format, select <Expression...>)
#,0
-or-
#,0.00
etc
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Hi again!
Enrique, your solution works.
My problem was that if you format the value in the .Value expresion, using
funtions like FormatNumber or FormatPercentage, the format entered in the
.Format expresion is not taked into account.
If I only show the Value in the textbox, and use the .Format property using
the MS Excel custom styles[ ="#,##0;(#,##0)"] it works!!!!!
Thanks you very much!!
Regards.
David Rodríguez Rincón
"EMartinez" <emartinez.pr1@.gmail.com> wrote in message
news:1187661848.228911.233150@.50g2000hsm.googlegroups.com...
On Aug 20, 12:57 pm, "David Rodríguez Rincón" <d_rin...@.hotmail.com>
wrote:
> Hi all
> When I export my reports to excel, all cells are set to "General" number
> style.
> Users wanted to show numbers as "Number", but I didn't found the way to
> set
> the cell output style.
> Any idea?
> Thanks in advance.
Depending on your needs, you may be able to set the field's format
based on what the numbering format needs to be. Maybe something like
one of the following as an expression in the Format property (select
the control -> select the View drop-down list -> Properties Window ->
to the right of Format, select <Expression...>)
#,0
-or-
#,0.00
etc
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||On Aug 22, 1:11 pm, "David Rodr=EDguez Rinc=F3n" <d_rin...@.hotmail.com>
wrote:
> Hi again!
> Enrique, your solution works.
> My problem was that if you format the value in the .Value expresion, using
> funtions like FormatNumber or FormatPercentage, the format entered in the
> .Format expresion is not taked into account.
> If I only show the Value in the textbox, and use the .Format property usi=ng
> the MS Excel custom styles[ =3D"#,##0;(#,##0)"] it works!!!!!
> Thanks you very much!!
> Regards.
> David Rodr=EDguez Rinc=F3n
> "EMartinez" <emartinez...@.gmail.com> wrote in message
> news:1187661848.228911.233150@.50g2000hsm.googlegroups.com...
> On Aug 20, 12:57 pm, "David Rodr=EDguez Rinc=F3n" <d_rin...@.hotmail.com>
> wrote:
> > Hi all
> > When I export my reports to excel, all cells are set to "General" number
> > style.
> > Users wanted to show numbers as "Number", but I didn't found the way to
> > set
> > the cell output style.
> > Any idea?
> > Thanks in advance.
> Depending on your needs, you may be able to set the field's format
> based on what the numbering format needs to be. Maybe something like
> one of the following as an expression in the Format property (select
> the control -> select the View drop-down list -> Properties Window ->
> to the right of Format, select <Expression...>)
> #,0
> -or-
> #,0.00
> etc
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
You're welcome. Glad I could be of assistance.
Regards,
Enrique Martinez
Sr. Software Consultant|||Hi again!
Enrique, your solution works.
My problem was that if you format the value in the .Value expresion, using
funtions like FormatNumber or FormatPercentage, the format entered in the
.Format expresion is not taked into account.
If I only show the Value in the textbox, and use the .Format property using
the MS Excel custom styles[ ="#,##0;(#,##0)"] it works!!!!!
Thanks you very much!!
Regards.
David Rodríguez Rincón
"EMartinez" <emartinez.pr1@.gmail.com> wrote in message
news:1187661848.228911.233150@.50g2000hsm.googlegroups.com...
On Aug 20, 12:57 pm, "David Rodríguez Rincón" <d_rin...@.hotmail.com>
wrote:
> Hi all
> When I export my reports to excel, all cells are set to "General" number
> style.
> Users wanted to show numbers as "Number", but I didn't found the way to
> set
> the cell output style.
> Any idea?
> Thanks in advance.
Depending on your needs, you may be able to set the field's format
based on what the numbering format needs to be. Maybe something like
one of the following as an expression in the Format property (select
the control -> select the View drop-down list -> Properties Window ->
to the right of Format, select <Expression...>)
#,0
-or-
#,0.00
etc
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

No comments:

Post a Comment