473,441 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,441 software developers and data experts.

Q: open excel in asp.net

Hello,
How can I open an excel file in asp.net. I have a dropdown list that keeps
excel file names and when user click view button I need to open file selected
with excel. How should I do this?
Thanks,
Jim.

Nov 19 '05 #1
4 1599
Send the file to the browser.
Response.Redirect(http://www.example.org/myfile.xls);

--
Daniel Fisher(lennybacon)
MCP ASP.NET C#
Blog: http://www.lennybacon.com/
"JIM.H." <JI**@discussions.microsoft.com> wrote in message
news:91**********************************@microsof t.com...
Hello,
How can I open an excel file in asp.net. I have a dropdown list that keeps
excel file names and when user click view button I need to open file
selected
with excel. How should I do this?
Thanks,
Jim.

Nov 19 '05 #2
This is helpful. Thanks. Is there any way to read the file another drive? Not
under wwwroot.

"Daniel Fisher(lennybacon)" wrote:
Send the file to the browser.
Response.Redirect(http://www.example.org/myfile.xls);

--
Daniel Fisher(lennybacon)
MCP ASP.NET C#
Blog: http://www.lennybacon.com/
"JIM.H." <JI**@discussions.microsoft.com> wrote in message
news:91**********************************@microsof t.com...
Hello,
How can I open an excel file in asp.net. I have a dropdown list that keeps
excel file names and when user click view button I need to open file
selected
with excel. How should I do this?
Thanks,
Jim.


Nov 19 '05 #3
Response.WriteFile(path);

--
Daniel Fisher(lennybacon)
MCP ASP.NET C#
Blog: http://www.lennybacon.com/
"JIM.H." <JI**@discussions.microsoft.com> wrote in message
news:49**********************************@microsof t.com...
This is helpful. Thanks. Is there any way to read the file another drive?
Not
under wwwroot.

"Daniel Fisher(lennybacon)" wrote:
Send the file to the browser.
Response.Redirect(http://www.example.org/myfile.xls);

--
Daniel Fisher(lennybacon)
MCP ASP.NET C#
Blog: http://www.lennybacon.com/
"JIM.H." <JI**@discussions.microsoft.com> wrote in message
news:91**********************************@microsof t.com...
> Hello,
> How can I open an excel file in asp.net. I have a dropdown list that
> keeps
> excel file names and when user click view button I need to open file
> selected
> with excel. How should I do this?
> Thanks,
> Jim.
>


Nov 19 '05 #4
Thanks but I could not get Response.WriteFile(path) working. It shows lost of
garbage, not excel sheet. I also have this question: If path has D:\ drive in
it and users run web application in their local computer, does it bring excel
file in D:\ drive in the server, or it will look D:\ driver on the local
computer. If local computer, it will not work for me because users should
read the file in the server's D:\ drive.

"Daniel Fisher(lennybacon)" wrote:
Response.WriteFile(path);

--
Daniel Fisher(lennybacon)
MCP ASP.NET C#
Blog: http://www.lennybacon.com/
"JIM.H." <JI**@discussions.microsoft.com> wrote in message
news:49**********************************@microsof t.com...
This is helpful. Thanks. Is there any way to read the file another drive?
Not
under wwwroot.

"Daniel Fisher(lennybacon)" wrote:
Send the file to the browser.
Response.Redirect(http://www.example.org/myfile.xls);

--
Daniel Fisher(lennybacon)
MCP ASP.NET C#
Blog: http://www.lennybacon.com/
"JIM.H." <JI**@discussions.microsoft.com> wrote in message
news:91**********************************@microsof t.com...
> Hello,
> How can I open an excel file in asp.net. I have a dropdown list that
> keeps
> excel file names and when user click view button I need to open file
> selected
> with excel. How should I do this?
> Thanks,
> Jim.
>


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
1
by: Lize | last post by:
Hi, I'm writing an ASP application to open an excel workbook, then run a macro stored in the excel file, which produces outputs that will be displayed back onto my ASP application. Now the...
1
by: Jim | last post by:
This should really be simple, but I can't figure it out. I have some VB that exports a table in an Excel format ("C:\NewReport.xls"). After the export is done, I simply want to have some code...
3
by: Jennyfer Barco | last post by:
Hello, I have a question, how can I open Microsoft Excel from .NET. I only need to open a new file in Excel and paste some information and set the Microsoft Excel as the enabled aplication, so the...
1
by: Bon | last post by:
Hello all I create a form with three buttons in MS Access 2000. They are Open Excel Template, Save Draft and Save Final. When I click the Open Excel Template button, the Excel template will be...
6
by: Michael Groeger | last post by:
Hi, I have an aspx page which generates an excel document and transfers it to the browser as attachment. Normally, once the document is transferred the open save dialog prompts to open or save...
3
by: Agnes | last post by:
Dim dsExcelExport As New System.Data.DataSet Dim daExcelExport As New System.Data.SqlClient.SqlDataAdapter Dim Excel As New Excel.Application Dim strExcelFile As String Dim strFileName As...
8
by: shenkel55 | last post by:
I'm using Access and Excel 2003. Using either the import wizard or code, I have the same problem. This problem only happens with Excel files automatically generated by Corp IT. If I try to do an...
7
by: Peter | last post by:
ASP.NET 2.0 I am trying to open a Word document and Excel document from a dialog web page, what's the best way to do that? I have tried the following: Response.Clear();...
22
by: robertgregson | last post by:
Using C#, .NET3.5, Visual Studio 2008 and WCF on Windows VISTA SP1, I have written a service, service host (as a C# console application) and a client. The service uses...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.