Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.
Mon Nov 02, 2015 9:26 am
Hello
I'm trying Spire?xls demo.
Until now, I used ole and Excel to compute percentile of data. Today, I try to get ride of Excel and want to use Spire.xls to achive the goal.
Problem is I have a runtime error when I try to write formula into my spreadsheet:
Appli.LoadFromFile(My.Application.Info.DirectoryPath + "\PercentileNarval.xlsx")
TFeuille = Appli.Worksheets(0)
TFeuille.Range(1, 2).Formula = "=PERCENTILE(A:A;0.95)"
Error : No Range accept this kind of argument on the percentil line. Could you help me please?
-
feanor91
-
- Posts: 1
- Joined: Thu Sep 17, 2015 11:51 am
Tue Nov 03, 2015 2:43 am
Hi,
Thanks for your inquiry.
The problem may be caused by the decimal separator of your local culture, please try this solution.
- Code: Select all
CultureInfo cc = Thread.CurrentThread.CurrentCulture
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture
TFeuille.Range(1, 2).Formula = "=PERCENTILE(A:A,0.95)"
Appli.SaveToFile("sample.xlsx", ExcelVersion.Version2010)
Thread.CurrentThread.CurrentCulture = cc;
Best Regards,
Amy
E-iceblue support team
-
amy.zhao
-
- Posts: 2774
- Joined: Wed Jun 27, 2012 8:50 am
Fri Nov 06, 2015 7:53 am
Hi,
Has your issue been resolved?
Thanks for your feedback.
Best Regards,
Amy
E-iceblue support team
-
amy.zhao
-
- Posts: 2774
- Joined: Wed Jun 27, 2012 8:50 am