• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2308
  • Last Modified:

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

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
ghsnehashis
Asked:
ghsnehashis
  • 2
  • 2
1 Solution
 
jcimarronCommented:
0
 
ghsnehashisAuthor Commented:
Thanks for your reply. I will check and update.
0
 
ghsnehashisAuthor Commented:
Thanks jcimarron.

Thanks for your help.

It's a great solution. Every one needs to know this solution.
0
 
jcimarronCommented:
ghsnehashis--You are most welcome!!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now