Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all articles
Browse latest Browse all 1350

Display Excel file on Click

$
0
0
<div class="body">

Hello,

I created a web application and I wanted to include a button that would display a related excel workbook.

The code I used to accomplish this:

 var run = new ProcessStartInfo
            {
                FileName = @"\\dev-10\appServer\TestApp\Status\_summary.xlsx"
            };
            var p = new Process {StartInfo = run};
            p.Start();
            Response.Redirect(Request.RawUrl);

This code works locally but when pushed to my server it doesn't work at all. I need an alternative to this code or a modification to it so that when a user clicks a button this code runs and displays the excel file.

Additional Notes:

- the file is only being pulled from the web server when it is local and pushed to production so not sure why it only works when it is local

</div>

Viewing all articles
Browse latest Browse all 1350

Trending Articles