View Single Post
  #2 (permalink)  
Old February 7th, 2007, 08:30 AM
joefawcett's Avatar
joefawcett joefawcett is offline
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You can try setting eWAPP.UserControl = true at some stage. Personally I dislike using ActiveSheet and similar in automation, it's too likely to go wrong. I would use:
Code:
var oWorkbook = eWApp.Workbooks.Add()
xlSheet = oWorkbook.Sheets[0] //or oWorkbook.Sheets[1] I can't remember if Sheets is one or zero based.
--

Joe (Microsoft MVP - XML)
Reply With Quote