Click here to Skip to main content
15,897,334 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi,

I am trying upload data from excel to DB its works fine local but in server

The process cannot access the file 'C:\Inetpub\vhosts\leadsrow.com\httpdocs\solar1\Excel\Posted.xls' because it is being used by another process.

am geting like this am close the worksheet.also
Posted
Updated 24-Jan-18 2:57am
Comments
Sergey Alexandrovich Kryukov 28-Sep-15 13:00pm    
Sorry, not enough information. I can give you just the general consideration to be taken, but it may well solve your problem.
—SA
Sreekanth Mothukuru 28-Sep-15 13:05pm    
Once you are done processing with the excel file you must close, flush and dispose file object. Otherwise this issue will appear. I guess you are not disposing or flushing the File object.
JagadishBB 28-Sep-15 13:08pm    
What Sreekanth told will work , beacause i too faced this problem.

1 solution

Please see my comment to the question and my past answer: how to compress the error 'it is already used by another process' in vb.net[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900