Problems reading Cell data using worksheet.get_range method

J

Johnnytz1

3:11:29 PM | Message: Exception from HRESULT: 0x800A9C68 | Data:
System.Collections.ListDictionaryInternal | Source: | InnerException: |
StackTrace: at System.RuntimeType.ForwardCallToInvokeMember(String
memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes,
MessageData& msgData)
at Excel.Range.get_Value2()
at TMG.KnowNow.FormMain.Timer1_Tick(Object sender, EventArgs e) in
C:\Documents and
Settings\john.zambuto\Desktop\TMG.KnowNowV2\TMG.KnowNow\FormMain.cs:line 262
| TargetSite: System.Object ForwardCallToInvokeMember(System.String,
System.Reflection.BindingFlags, System.Object, Int32[],
System.Runtime.Remoting.Proxies.MessageData ByRef)
 
J

Johnnytz1

Sorry that is the exception being thrown. Here is my code. I am just trying
to read cell data for specific cells. These cells get updated by a DDE Link .

private void Timer1_Tick(object sender, EventArgs e)
{
try
{
for (int i = 0; i < this._cellRange.Length; i++)
{
Excel.Range range =
(Excel.Range)this._excelWrkSheet.get_Range(this._cellRange, Missing.Value);
this._proccessQueue.AddToQueue(new
RangeManager(range.Value2, range.Columns.Count, range.Rows.Count,
range.Column, range.Row));
Marshal.ReleaseComObject(range);
}
}
catch (System.Runtime.InteropServices.COMException f)
{ Log.GetInst().LogException(f); }
catch (Exception f)
{ Log.GetInst().LogException(f); }
}

Any help would be appreciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top