|
-
December 3rd, 2006, 08:10 AM
#1
how to create an excel file???
Hello,
I have a asp.net web application which inside it I create a string with a table, which I want to be able to open an excel file with the data in that table.
my problem is that I am not able to open the excel in a new window(I do create the excel file. but it is being opend be the browser in the same page and not in a new page).
I use the following code:
Response.ContentType = "application/vnd.ms-excel";
Response.Write(ExcelString);
Response.End();
When ExcelString = “<TABLE borderColor=#808080 border=1>
<THEAD>
<TR>
<TH BGCOLOR='BLUE'>Date</TD>
<TH BGCOLOR='BLUE'># New Accounts</TD>
<TH BGCOLOR='BLUE'>Log In</TD>
<TH BGCOLOR='BLUE'>Deposit</TD>
<TH BGCOLOR='BLUE'>Withdraw</TD>
<TH BGCOLOR='BLUE'>Pending Withdrawal</TD>
<TH BGCOLOR='BLUE'>Bonus</TD>
<TH BGCOLOR='BLUE'>Sum Of Bonus</TD>
<TH BGCOLOR='BLUE'># Bets</TD>
<TH BGCOLOR='BLUE'># Match Bets</TD>
<TH BGCOLOR='BLUE'>Match Bets Sum</TD>
<TH BGCOLOR='BLUE'>UnMatch Bets Sum</TD>
<TH BGCOLOR='BLUE'>Profit\Loss</TD>
<TH BGCOLOR='BLUE'>Commission Profit</TD>
</TR>
<TR>
<TH BGCOLOR='BLUE'></TD>
<TH BGCOLOR='BLUE'></TD>
<TH BGCOLOR='BLUE'></TD>
<TH BGCOLOR='BLUE'></TD>
<TH BGCOLOR='BLUE'></TD>
<TH BGCOLOR='BLUE'></TD>
<TH BGCOLOR='BLUE'></TD>
<TH BGCOLOR='BLUE'></TD>
<TH BGCOLOR='BLUE'></TD>
<TH BGCOLOR='BLUE'></TD>
<TH BGCOLOR='BLUE'></TD>
<TH BGCOLOR='BLUE'></TD>
<TH BGCOLOR='BLUE'></TD>
<TH BGCOLOR='BLUE'></TD>
</TR>
</THEAD>
<TBODY>
<TR>
<TD>12/2006</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
</TR>
<TR>
<TD>TOTAL</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
<TD>0</TD>
</TR>
</TBODY>
</TABLE>"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|