This is Sathya from Bangalore, a fresher in Dot Net Programming working for a small Software Organization.
I have created a web application [Using vb
.net as the code behind language -VS.NET 2003]. Through this application I am trying to import data from MS Excel 2000 to MS Access database, which did not have any problem while importing. It gets successfully imported when Excels are in protected mode.
Now I created some excel sheets from other PC with different MS Office version and tried to import, it did not go through. I opened these excels [other office version ]from the PC through MS Office 2000, where I developed the application and saved them. Then I was able to import under protected mode.
If I un protect the excel sheet and modify some data, protect it and save it, I am not able to import. My application halts forever and does not go through.
I am using Ms Excel 9.0 as the ref object in my application.
Here is the code which I am using.
Dim objXl As New Excel.Application
objXl.ShowWindowsInTaskbar = True
When I debug the program, it comes to
'objXl.Workbooks.Add(PathNameofExcel)' line of code and halts forever.
Without any modification the excel will get imported, with little modifications and saving it in protected mode, it behaves this way with the same excel sheet.
Please Provide some solution for this.