MoveYourShoes
Member
I have been fighting with this for awhile now. Im sure theres a reason for it. Every sample I try that automates Excel always works on my development machine but on a test machine it always fails.
With this particular sample it fails on this line:
WSheet = EXL.Workbooks.Add.Worksheets.Add
Other sample lines that also fail are:
xlbook = xlapp.Workbooks.Add
and
xlsheet = xlapp.Sheets(1)
This line always executes fine:
xlapp = New Excel.Application
but any subsequent code that actually uses the xlapp object always fails....
and I ALWAYS get this same error message:
queryinterface for interface excel._application failed
I hope SOMEONE can help figure out how to get around this, if not then Ill chalk it up to just one more thing that VS.NET doesnt do that its supposed to do unless Im doing it on my development machine!! (grrr)
With this particular sample it fails on this line:
WSheet = EXL.Workbooks.Add.Worksheets.Add
Other sample lines that also fail are:
xlbook = xlapp.Workbooks.Add
and
xlsheet = xlapp.Sheets(1)
This line always executes fine:
xlapp = New Excel.Application
but any subsequent code that actually uses the xlapp object always fails....
and I ALWAYS get this same error message:
queryinterface for interface excel._application failed
I hope SOMEONE can help figure out how to get around this, if not then Ill chalk it up to just one more thing that VS.NET doesnt do that its supposed to do unless Im doing it on my development machine!! (grrr)