Excel Application.SetReferenceStyle
Trying to get a range using the R1C1 nomenclature, the following code fails:
objApp.SetReferenceStyle((long) (-4150)); // xlR1C1 lpDispatch = objSheet.GetRange(COleVariant("R1C1"), COleVariant("R1C1")); How do you use R1C1 addressing in [MFC] C++? |
Excel Application.SetReferenceStyle
I suspect you need to use A1 style referencing. The set reference style
you have is the same as going into Tools=Options=General tab, reference style. However, in the object model, the range object expects A1 style referencing regardless of this setting. -- Regards, Tom Ogilvy "Where am I?" wrote in message ... Trying to get a range using the R1C1 nomenclature, the following code fails: objApp.SetReferenceStyle((long) (-4150)); // xlR1C1 lpDispatch = objSheet.GetRange(COleVariant("R1C1"), COleVariant("R1C1")); How do you use R1C1 addressing in [MFC] C++? |
Excel Application.SetReferenceStyle
1. Is there another way to address cells using indicies?
In other words, how would you do this from C++: Worksheets("Sheet1").Cells(6, 1).Value = 10 2. No arguments for GetCells() function? What does it return? 3. Where do you find documentation on these functions? "Tom Ogilvy" wrote: I suspect you need to use A1 style referencing. The set reference style you have is the same as going into Tools=Options=General tab, reference style. However, in the object model, the range object expects A1 style referencing regardless of this setting. -- Regards, Tom Ogilvy "Where am I?" wrote in message ... Trying to get a range using the R1C1 nomenclature, the following code fails: objApp.SetReferenceStyle((long) (-4150)); // xlR1C1 lpDispatch = objSheet.GetRange(COleVariant("R1C1"), COleVariant("R1C1")); How do you use R1C1 addressing in [MFC] C++? |
All times are GMT +1. The time now is 03:40 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com