We help IT Professionals succeed at work.

Microsof.interop.excel services changing percentage format

58 Views
Last Modified: 2017-04-01
Hi Guys

I am currently busy with a service using Microsoft.interop.Excel, and i am calculating the percentage, on my dev(windows 7) i have no problem, when i deploy the solution to the server(Server 2012) the number format is being changed from 0.00% to 0\.00% any idea what the cause of this could be?

This is the code i used

xSheet.Cells(27, 4 + DayCount).NumberFormat = "0.00%"
                            xSheet.Cells(27, 4 + DayCount).value = CDec(xSheet.Cells(25, 4 + DayCount).value / xSheet.Cells(26, 4 + DayCount).value)
Comment
Watch Question

CERTIFIED EXPERT

Commented:
Check the regional settings in server to see if they match those on your pc , those settings that have to do with number and currency formatting may have something to do with your problem.
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Found my own solution that worked
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.