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 Sep 23, 2013 8:38 pm

I'm getting an exception:
RC[-2] is not valid named range
at ob.a(Int32 A_0, String A_1, ParseParameters A_2, Dictionary`2 A_3, Int32 A_4, ParseFormulaOptions A_5)
at ob.a(String A_0, ParseParameters A_1, Dictionary`2 A_2, Int32 A_3, ParseFormulaOptions A_4, Int32 A_5)
at ob.a(String A_0, Dictionary`2 A_1, Int32 A_2, ParseFormulaOptions A_3, ParseParameters A_4)
at ob.a(Priority A_0, Dictionary`2 A_1, Int32 A_2, ParseFormulaOptions& A_3, ParseParameters A_4)
at ob.a(Priority A_0, Dictionary`2 A_1, Int32 A_2, ParseFormulaOptions A_3, ParseParameters A_4)
at ob.b(String A_0, Dictionary`2 A_1, Int32 A_2, ParseFormulaOptions A_3, ParseParameters A_4)
at Spire.Xls.Core.Spreadsheet.FormulaUtil.a(String A_0, IWorksheet A_1, Dictionary`2 A_2, Int32 A_3, Int32 A_4, Boole
an A_5)
at Spire.Xls.Core.Spreadsheet.XlsRange.SetFormula(String value, Dictionary`2 hashWorksheetNames, Boolean bR1C1)
at Spire.Xls.Core.Spreadsheet.XlsRange.OnValueChanged(String old, String value)
at Spire.Xls.Core.Spreadsheet.XlsRange.set_Value(String value)
at Spire.Xls.Core.Spreadsheet.XlsRange.set_Formula(String value)
...

Is R1C1 format supported for formulas?

Thanks
Scott

scott.dubose@virtusllc.com
 
Posts: 17
Joined: Wed Sep 18, 2013 8:49 pm

Tue Sep 24, 2013 7:03 am

Dear Scott,

Thanks for your inquiry again.
Yes, our Spire.Xls supports R1C1 format formulas.
Could you please share your code here? To help us do a research and solve the issue soon.
Thanks!

Best regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Tue Sep 24, 2013 2:33 pm

Essentially we are doing:

Code: Select all
 worksheet.Range[currentRow, colIndex].Formula = "=RC[-2] + R[-1]C"


thanks
scott

scott.dubose@virtusllc.com
 
Posts: 17
Joined: Wed Sep 18, 2013 8:49 pm

Tue Sep 24, 2013 2:56 pm

Nevermind, I found that we can just the FormulaArrayR1C1 property.
Thanks!
Scott

scott.dubose@virtusllc.com
 
Posts: 17
Joined: Wed Sep 18, 2013 8:49 pm

Wed Sep 25, 2013 1:31 am

Dear Scott,

Thanks for your further research.
Welcome to contact us freely If you have further questions.
BTW, has the issue(how-can-i-create-a-global-style-t4489.html) been solved?

Best regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.XLS