Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

importing from excel

svibuksvibuk Posts: 10Member
i am imorting excel data to sql db uisng asp.net
i have 2 issue regrading the same

1) suppose i import a A.xls when the .net application is executed
it gets imported correctly for the first time
but if i try to import the same file again i get error as this file is used by some process...

i have
private void KillUnusedExcel()
{
System.Diagnostics.Process[] killUnused = System.Diagnostics.Process.GetProcessesByName("Excel");
foreach (System.Diagnostics.Process open in killUnused)
{
if (open.MainWindowTitle.Length == 0)
{
open.Kill();

}
}
}

i closed the connection string also but still the excel doesnot quit from memory
so how to relase the excel from memory once the importing of one file is done

2) Al l records not getting imported in production server but works fine in development server
i am having 50 records in my excel sheet
in my developemnt server all 50 recods gets imported
i published the same code in my production server & using the same exxel files
so all 50 records shld be imported
but only one record is imported & no error msg is thrown
so asked abyt the remaining records
as the code is same ,database is same & excel sheet is aslo same

Sign In or Register to comment.