Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Retrieving formulas property in Office System in Spanish

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem starting Office XP SP3 after system restore Peter van der Donk Setting up and Configuration of Excel 1 October 22nd 06 03:59 AM
Where is a sample formula for retrieving the system date? Artemis Excel Discussion (Misc queries) 3 January 31st 06 02:18 AM
excel formulas in spanish German Excel Discussion (Misc queries) 2 August 28th 05 08:56 AM
my system crashed & i had to reload xp, now I cant get my office . rob Setting up and Configuration of Excel 4 March 16th 05 08:31 PM
How do I create a grading system in Office Excel? Miss Dunkley New Users to Excel 1 January 29th 05 02:28 PM


All times are GMT +1. The time now is 04:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"