Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
metser
Starting Member
27 Posts |
Posted - 2005-07-14 : 03:13:57
|
| Hello all. I am building a system for tracking sales leads (ASP+SQL servers). Both my Website and Database are on a shared hosting environment (i.e - I do not have full control over the IIS and SQL servers). I need my users to be able to log into the system and download reports to their computer. For example - search for all US sales leads and then download the result table in some format. Even an Excel spreadsheet report format will do, for now. No need for complicated graphs and pie charts. Is there a way to accomplish this through ASP (again - these are not dedicated server where I have full control, but a shared hosting environment).Your help is much appreciated. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
metser
Starting Member
27 Posts |
Posted - 2005-07-14 : 10:33:00
|
| Thank you for your answer. Following the thread you supplied, I still have a question (same as the one CodeHorse asked in the link you referred me to): How do I "dump" the data into an excel file on the user's machine? |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
metser
Starting Member
27 Posts |
Posted - 2005-07-14 : 11:34:33
|
| Thanks. I found a different solution - ugly but simple:In my ASP page I insert the following two lines:<% Response.ContentType = "application/msexcel" %><% Response.AddHeader "content-disposition","attachment; filename=MyFile.xls" %>Upon requesting the file, the user is prompt to download/save an excel file to his machine.On the ASP code side, all I do is create a table (yes, yes - an HTML table!) i.e - "<table border="1"><tr>"... and then I just iterate through the DB records, not forgetting to close the table at the end. This produces a simple, jenuine but sufficient to my needs Excel file, which can even be sorted... I have even marked the first line with the "<b></b>" tag, which gives a nice header line to the spreadsheet.Your comments are welcome... Thank you |
 |
|
|
|
|
|
|
|