?
Solved

Attempted to read or write protected memory. This is often an indication that other memory is corrupt

Posted on 2011-09-14
5
Medium Priority
?
2,160 Views
Last Modified: 2013-12-17
Code :

Microsoft.Office.Interop.Excel.Workbook excelWorkbook = excelApp.Workbooks.Open(workbookPath,
                        0, false, 5, "", "", false, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "",
                        true, false, 0, true, false, false);



When trying to open excel it is throwing an error "Attempted to read or write protected memory. This is often an indication that other memory is corrupt".
0
Comment
Question by:ghsnehashis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 50

Accepted Solution

by:
jcimarron earned 2000 total points
ID: 36538981
0
 

Author Comment

by:ghsnehashis
ID: 36540662
Thanks for your reply. I will check and update.
0
 

Author Closing Comment

by:ghsnehashis
ID: 36541625
Thanks jcimarron.

Thanks for your help.

It's a great solution. Every one needs to know this solution.
0
 
LVL 50

Expert Comment

by:jcimarron
ID: 36544074
ghsnehashis--You are most welcome!!
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The canonical version of this article is on my web site here: http://iconoun.com/articles/collisions/ A companion presentation is available here: http://iconoun.com/articles/collisions/Unicode_Presentation.pdf
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question