Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application, both ASP.NET web sites and Windows Forms application.

Wed Jan 11, 2012 11:23 am

hi Support
I am using asp.net to write a picture to an excel file.
I get a problem that such original picture file is locked by w3wp.exe process after excel is saved.
Please help. Thanks
Bruce

bruce.luk
 
Posts: 10
Joined: Wed Dec 21, 2011 1:53 am

Thu Jan 12, 2012 6:47 am

Hello Bruce,

Sorry for the inconvenience caused by us and thank you for your inquiry. We simulated what you did(using asp.net to write a picture to an excel file), it works well. Would you please send us more informations to help us reproduce the issue? I also attached you the simple demo, please have a look.

Thanks in advance.
Have a great day.

BR
Suvi
e-iceblue support team
Attachments
308PicLock.7z
(149.26 KiB) Downloaded 394 times
User avatar

Suvi.Wu
 
Posts: 154
Joined: Thu Oct 20, 2011 2:53 am

Thu Jan 12, 2012 9:26 am

hi Suvi,

I have sent an email to you describe the problem details. Please check whether you have received it.
Write picture to excel function works well. But the file will then be locked by web server w3wp.exe process. The file cannot be deleted unless we restart the IIS application pools.

Please help.

Thanks
Bruce

bruce.luk
 
Posts: 10
Joined: Wed Dec 21, 2011 1:53 am

Tue Jan 17, 2012 6:17 am

Hello Bruce,

Sorry for this inconvenience caused by us and thank you for your patience with our support team.

We have sent you an E-mail to solve this problem. Please check your E-mail.

Have a great day.

BR
Suvi
e-iceblue support
User avatar

Suvi.Wu
 
Posts: 154
Joined: Thu Oct 20, 2011 2:53 am

Tue Jan 17, 2012 9:04 am

hi Suvi,

Received your email. Thanks for your follow up. It works for your suggested coding.

However, i cannot find the way to add multiple pictures in the same file. Please suggest.

Thanks & Best Regards,
Bruce

bruce.luk
 
Posts: 10
Joined: Wed Dec 21, 2011 1:53 am

Tue Jan 17, 2012 11:54 am

hi Suvi, Harry,

Thank you for your suggested solution.
The coding works.

Best Regards,
Bruce

bruce.luk
 
Posts: 10
Joined: Wed Dec 21, 2011 1:53 am

Thu Jan 19, 2012 1:47 am

You are welcome.
Please let us know if you have any other question.
Harry
Technical Support / Developer,
e-iceblue Support Team
User avatar

harry.support
 
Posts: 180
Joined: Mon Nov 08, 2010 3:11 pm

Fri Mar 31, 2017 9:12 am

hi Support,

i also have the same issue " the file will then be locked by web server w3wp.exe process. ",
would you kind give the solution..

Thanks.
Best Regards.

1030072
 
Posts: 1
Joined: Thu Mar 30, 2017 2:33 am

Fri Mar 31, 2017 9:38 am

Dear 1030072,

Thanks for your inquiry.
Here is a solution which may solve your issue, please have a try.
Code: Select all
Workbook wb = new Workbook();
Worksheet ws = wb.Worksheets[0];
String path = Server.MapPath("/adorable.jpg");
using (System.IO.FileStream stream = System.IO.File.OpenRead(path))
{
ws.Pictures.Add(1, 1, stream);
wb.SaveToFile(Server.MapPath("/test.xls"));
}

If the issue still persists, please provide us following information for investigation.
1)Input files.
2)The code you were using.
3)OS informtaion.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 2939
Joined: Tue Sep 06, 2016 8:30 am

Wed Apr 05, 2017 9:16 am

Dear 1030072,

How is the issue now ?
I will appreciate it if you could give us some feedback.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 2939
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.XLS

cron