Click here to Skip to main content
15,898,930 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: get control id from the content page Pin
srinandan..16-Mar-07 4:03
srinandan..16-Mar-07 4:03 
AnswerRe: get control id from the content page Pin
Jesse Squire16-Mar-07 3:49
Jesse Squire16-Mar-07 3:49 
GeneralRe: get control id from the content page Pin
srinandan..16-Mar-07 3:58
srinandan..16-Mar-07 3:58 
GeneralRe: get control id from the content page Pin
Jesse Squire16-Mar-07 5:37
Jesse Squire16-Mar-07 5:37 
GeneralRe: get control id from the content page Pin
srinandan..18-Mar-07 21:08
srinandan..18-Mar-07 21:08 
QuestionMysterious Web User Controls Related Problem Pin
powered_by_xanax16-Mar-07 2:54
powered_by_xanax16-Mar-07 2:54 
QuestionHow to transfer data from HTML table to excel or through dataset to excel. Pin
AjayKrSh16-Mar-07 2:53
AjayKrSh16-Mar-07 2:53 
AnswerRe: How to transfer data from HTML table to excel or through dataset to excel. Pin
Jesse Squire16-Mar-07 3:27
Jesse Squire16-Mar-07 3:27 
There are a few ways that you can go about this, depending on how complex your spreadsheet and formatting needs are. In a simple case, the approach that you mention of forming HTML and tricking Excel into parsing it, is a good one. There are plenty of articles available if you care to google, but the basic implementation involves you setting header values from your page. For example:

Response.AddHeader("content-disposition", "attachment; filename=MyExcelSheet.xls");

Response.ContentType = "application/ms-excel";


That technique only works if the formatting is simple. If you require more advanced formatting or the use of formulas, you may wish to consider purchasing one of the commercial components that allow you to work with the Excel native format without Office being present on the machine, such as this[^] one.

As a last resort, it is possible to install Office on the server and use the Office interop assemblies to automate Excel. Please note that I label this the last resort, because it is slower, consumes more resources, and requires client software to be installed on a server (potentially increasing the attack surface.)

Hope that helps. Smile | :)

  --Jesse
"... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

GeneralRe: How to transfer data from HTML table to excel or through dataset to excel. Pin
AjayKrSh16-Mar-07 3:48
AjayKrSh16-Mar-07 3:48 
GeneralRe: How to transfer data from HTML table to excel or through dataset to excel. Pin
Jesse Squire16-Mar-07 3:54
Jesse Squire16-Mar-07 3:54 
Questionlistbox and arrays Pin
Kunal P16-Mar-07 2:47
Kunal P16-Mar-07 2:47 
Questionbrowser's back button Pin
yogita charhate16-Mar-07 2:27
yogita charhate16-Mar-07 2:27 
AnswerRe: browser's back button Pin
Kunal P16-Mar-07 2:40
Kunal P16-Mar-07 2:40 
GeneralRe: browser's back button Pin
yuvachandra16-Mar-07 2:48
yuvachandra16-Mar-07 2:48 
GeneralRe: browser's back button Pin
Kunal P16-Mar-07 4:45
Kunal P16-Mar-07 4:45 
GeneralRe: browser's back button Pin
yogita charhate16-Mar-07 4:13
yogita charhate16-Mar-07 4:13 
GeneralRe: browser's back button Pin
Kunal P16-Mar-07 4:48
Kunal P16-Mar-07 4:48 
QuestionSetting _DEBUG for web project Pin
Leo Smith16-Mar-07 2:26
Leo Smith16-Mar-07 2:26 
AnswerRe: Setting _DEBUG for web project Pin
Jesse Squire16-Mar-07 2:56
Jesse Squire16-Mar-07 2:56 
GeneralRe: Setting _DEBUG for web project Pin
Leo Smith16-Mar-07 4:16
Leo Smith16-Mar-07 4:16 
QuestionServer Error Pin
vijay_8316-Mar-07 2:22
vijay_8316-Mar-07 2:22 
AnswerRe: Server Error Pin
ca8msm16-Mar-07 2:30
ca8msm16-Mar-07 2:30 
AnswerRe: Server Error Pin
coolestCoder16-Mar-07 2:32
coolestCoder16-Mar-07 2:32 
Questioncan i poup messagebox ihrough codeing Pin
nikhil123416-Mar-07 2:17
nikhil123416-Mar-07 2:17 
AnswerRe: can i poup messagebox ihrough codeing Pin
RichardGrimmer16-Mar-07 2:20
RichardGrimmer16-Mar-07 2:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.