M
mp
if c# questions are allowed here....?
is this ok way to get list of range values?
in my case i just have a 1D range A1:A15 for example
for 2D range i'd have to think of some other way I suppose
....where _xlRange is a private member var pointing to an excel range
public List<string> RangeValueList()
{
if (_xlRange != null)
{
List<string> rangeList = new List<string>();
foreach (Range cell in _xlRange)
{
rangeList.Add( cell.Value2 );
}
return rangeList;
}
return null;
}
also wondering why i only get Value2 on the cell, not Value (in list of
intellisense)
is this ok way to get list of range values?
in my case i just have a 1D range A1:A15 for example
for 2D range i'd have to think of some other way I suppose
....where _xlRange is a private member var pointing to an excel range
public List<string> RangeValueList()
{
if (_xlRange != null)
{
List<string> rangeList = new List<string>();
foreach (Range cell in _xlRange)
{
rangeList.Add( cell.Value2 );
}
return rangeList;
}
return null;
}
also wondering why i only get Value2 on the cell, not Value (in list of
intellisense)