see07 Posted November 4, 2004 Posted November 4, 2004 Hello I have a web form project in which I need to open an .xls file, I have this code: string sysFolder = @"C:"; ProcessStartInfo pInfo = new ProcessStartInfo(); pInfo.FileName = sysFolder + @"\\tjcr.xls"; pInfo.UseShellExecute = true; Process p = Process.Start(pInfo); When last code line is executed, system remains as it was executing something (a glass hour is shown) but it may remain there for hours not showing Excel sheet. If I place this same code into a project using Windows Form is working OK. My questions are: It�s not possible use this code in a Web Form? What if I need to do it in a web form? I�ll appreciate your comments. A.L. Quote
Administrators PlausiblyDamp Posted November 5, 2004 Administrators Posted November 5, 2004 (edited) Running the above code in ASP.Net will cause Excel to be executed on the server (where it cannot be seen) rather than the client. If you want the worksheet to be opened on the client you will need to provide a link to the sheet so the user is prompted to save / open the document. Edited April 1, 2007 by PlausiblyDamp Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.