HeinrichMREx
New Member
- Joined
- Dec 9, 2012
- Messages
- 7
Hallo there,
I would appreciate help on two questions :
1) what could be the reason for this line to throw an exception :
I also tried
If I do it this way:
I get compile errors:
2)
) Do you known of some methods, which allow the selection of Excel Datasheets areas, so that it looks like this(with the color lines and dotes on the corner of the selections) ? :
I would appreciate help on two questions :
1) what could be the reason for this line to throw an exception :
Code:
range = worksheet.get_Range("A3", "B4");
myChart.SetSourceData(range.ToString(), PowerPoint.XlRowCol.xlColumns);
Exception Message: Error HRESULT E_FAIL has been returned from a call to a COM component.
I also tried
If I do it this way:
Code:
myChart.SetSourceData(range, Excel.XlRowCol.xlColumns);
I get compile errors:
1> error CS1502: The best overloaded method match for 'Microsoft.Office.Interop.PowerPoint.Chart.SetSourceData(string, object)' has some invalid arguments
1> error CS1503: Argument 1: cannot convert from 'Microsoft.Office.Interop.Excel.Range' to 'string'
2)
) Do you known of some methods, which allow the selection of Excel Datasheets areas, so that it looks like this(with the color lines and dotes on the corner of the selections) ? :