473,385 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem Using C# Excel Programming

HI Everybody,

I just joined the C# developer community. And hope u all C# gurus will help me to solve my problem.

OK ! Problem is this,

I am using Microsoft.Office.Interop.Excel;

Basically, I am trying to read different cell's data from No. of Excel files from the folder provided by the user.
Now, Running application is not a problem. It even creates destination file.

But when I am trying to close the application , It is giving me error as
" The instruction at "....(some hexadecimal no.)" referenced memeory at
"...(some hexadecimal no.)". The memory could not be "read".

I also checked out Every object created , and set it to null once usage is over.

Pls help me with this problem.

Simit
May 14 '07 #1
2 2005
SammyB
807 Expert 512MB
>I also checked out Every object created , and set it to null once usage is over.

Are you also using System.Runtime.InteropServices.Marshal.ReleaseComO bject on the objects? See http://support.microsoft.com/kb/306683
May 14 '07 #2
>I also checked out Every object created , and set it to null once usage is over.

Are you also using System.Runtime.InteropServices.Marshal.ReleaseComO bject on the objects? See http://support.microsoft.com/kb/306683



Thank u So much! That relieved a lot of pressure off me.

I checked out the Link u provided, and did the same way , mentioned in that small code snippet.
And now my application is working wonderfully fine.

Thnaks again.
May 15 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: moller | last post by:
I'm reposting this under a more appropriate subject since excel really has nothing to do with my problem. I'm new to perl but not to programming in general. I have been trying to put some...
0
by: Oci-One Kanubi | last post by:
Everything works fine in Access, but when I double-click on the resultant Excel files the first one opens correctly, but subsequent ones, and any other Excel files I try to open, fail to display at...
4
by: Chris | last post by:
Hi, everything works apart from the last line :-(( rng.Value2.ToString() An exception is thrown : "Old format or invalid type library" It gets compiled though (so he recognizes the property...
4
by: Hans [DiaGraphIT] | last post by:
Hi! I want to export a dataset to an excel file. I found following code on the net... ( http://www.codeproject.com/csharp/Export.asp ) Excel.ApplicationClass excel = new ApplicationClass();...
3
by: Atley | last post by:
I have made an application in VB.net 2003 and in it I create a Excel Workbook with several spreadsheets in it. When the code is finished creating the spreadsheets the workbook is saved to the...
5
by: Rajesh | last post by:
Hi, Please help me to do an EXCEL report generation using ASP.NET. I am building an website. This should work in all machine. I need do load the data from SQL tables to excel sheet and user can...
0
by: six888 | last post by:
i need to make a report using excel. im given a few data in excel document for a 1 month report (1 document for each week). each data document have a few work sheet.i need only certain information in...
11
by: nartla | last post by:
Hello, I work on an app developped with Access/VBA and communicating with a SQL Server database via ODBC. My problem is that I have to manage a big string which can be 0 to 1024 characters...
1
by: =?Utf-8?B?cmFqNzQ=?= | last post by:
I have an annoying situation when I each time open the Ms excel file I have to activate(pressing F2) a output cell (Col C) which is having a circular reference with Col A and enterthe cell to get...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.