c# - excel formula array -


Hello, I have AC # program that gives Excel 20077 series, as its formula is as follows

  Excel.Worksheet ws_res = (Excel.Worksheet) wb.Worksheets.Add (wrong, wrong, wrong, wrong); Excel.Range range_res = (Excel.Range) ws_res.get_Range ("A1", "HM232"); Range_res.FormulaArray = "= (If ((Sheet 4! A1: Hm 232 = 1.0," + "If (Sheet 4! A1: Hm 232 = 0,1, Sheet 4! A1: Hm 232))) = 1,0, "+" if (((Sheet 4! A1: Hm 232 = 1.0, "+" If (Sheet 4! A1: Hm 232 = 0,1, Sheet 4 ! A1: HM232))) = 0,1, ("+" if (sheet 4! A1: Hm 232 = 1.0, "+" if (sheet 4! A1: HM23 = 0,1 , Sheet 4! A1: HM 232)))));  

It tells me the exception that the formula is wrong ... but if open Excel 2007 and in a new sheet ( Let's say sheet 5) Select Category A1: HM232 and paste the above formulas directly into the formula bar , And then press Ctrl + Shift + Enter it's all right, ... plz can you tell me how to do this with C #?

I know if I have the formula 1 R1C1 Style, but if I

  "= ROUND ((IF (Sheet4! A1: HM232 = 1.0," + "if (sheet 4! A1: HM232 = 0,1, Sheet4! A1: HM232), 0) " 

It does not give me any exceptions and it does this like I did Ctrl + Shift + Enter From C # and Excel directly

For the above two formulas I have given the A1: HM 232 R1C1 has changed: R232C221 works fine from small C # but now there is no one!

I had added complexity to the ones I'm developing to use Excel in Spanish . To get the formulas in Excel you need to set a separate set of functions, ie FormulaLocal , instead of formula to work in non-English versions of Excel Use formulaR1C1Local intead formula1c1 etc. Works for a very simple example such as = RC [-1] + R4C4 Formulaire, but some = SUMA (SI (FC (- 2) = 1; F8 C (-3): F-1000C (-3); 0)) that contains the name and semicolon of the excel function, because logic markers do not - you get a runtime error. Something like that was translated into English, and using local sources, not R1C1 .. = SUM (IF (AC9 = 1, AB $ 8: AB $ 1000,0)) And that works.

This is surprising because a) published advice is to use R1C11 for RAC Formula and
B) if you use English function names You usually expect a runtime error.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -