Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi everyone:
I'm having the following problem using .NET components with Office System. I'm using an Add-in in Excel, written in C#, but I'm having an unexpected behavior when it runs with Office System in Spanish In order to avoid language issues, I'm using the property FormulaR1C1 to retrieve formulas, which I expect to be always in English (R#C# instead of F#C# which is the format used in Spanish). When I use VBScript, VBA or VB 6.0, this is correct; but when I use C#, I'm getting the F#C# format, exactly the same value as when using the FormulaR1C1Local property For instance, the following VBScript Set x = GetObject(, "Excel.Application") Set y = x.WorkSheets(1) MsgBox y.Cells (1,1).FormulaR1C1 //Retur ns R4C4 MsgBox y.Cells (1,1).FormulaR1C1Local //Returns F4C4 But the equivalent code, written in C# Excel.Application excelApp = (Excel.Application) System.Runtime.InteropServices.Marshal.GetActiveOb ject ("Excel.Application"): Excel.Worksheet excelApp.Worksheets[1]; Excel.Range x = (Excel.Range)worksheet.Cells [1,1]; String s = x.FormulaR1C1.ToString (); //Returns F4C4 String b = x.FormulaR1C1Local.ToString (); //Returns F4C4 Am I doing something wrong? This is a known issue? How can I correct it? Regards Rodolfo |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem starting Office XP SP3 after system restore | Setting up and Configuration of Excel | |||
Where is a sample formula for retrieving the system date? | Excel Discussion (Misc queries) | |||
excel formulas in spanish | Excel Discussion (Misc queries) | |||
my system crashed & i had to reload xp, now I cant get my office . | Setting up and Configuration of Excel | |||
How do I create a grading system in Office Excel? | New Users to Excel |