Skip Navigation Links



Create Dynamic Excel file using Asp.Net

Author : Kalpesh Satasiya      Blog :Software Development - Developer | Web Designer Ahmedabad India      Date: 11/30/2011 12:36:00 PM


public static void Write(HttpResponse response)
{

// make sure nothing is in response stream
response.Clear();
response.Charset = "";

// set MIME type to be Excel file.
response.ContentType = "application/ms-excel";

// add a header to response to force download (specifying filename)
response.AddHeader("Content-Disposition", "attachment; filename=\"MyFile.xls\"");

for (int i = 0; i < 10; i++)
{
// Send the data. Tab delimited, with newlines.
response.Write("Col1 \t Col2 \t Col3 \t Col4 \n");
}



// Close response stream.
response.End();

}

Bloggers

active bloggers in the last 24 hrs. Number shown in the bracket represents number of posts published in past 24 hrs,


other authors(45)

Vashi Chandiramani(9)

sankarshan(7)

Fidarose Isha(3)

MUNZ TDT(3)

Ashwin Baindur(2)

Deepak(2)

Firoze Shakir Photographerno1(2)

Govind Kumar(2)

Kartik Ramaswamy(2)

pixie(2)

R.D. Bhalekar(2)

Srinivasan Sampathkumar(2)

A, J and S(1)

AbhiLaSH RuHeLa(1)

Abhishek Mukherjee(1)

aburman(1)

Aliena Varghese(1)

Amar Naik(1)

amarllyis(1)

Anubhav Sharma(1)

Aravind GJ(1)

Archana Kumar(1)

arkadev(1)

Aruna Manikandan(1)

AS(1)

aseemrastogi2(1)

Atanu Ghosal(1)

Balachandran V(1)

Bharathram Pattabiraman(1)

BUTTERFLIES OF TIME(1)

chandrashekhara(1)

churumuri(1)

cresloga(1)

Debolina Raja Gupta(1)

Deeps(1)

Dheeraj Pandey(1)

Dr Babu(1)

Garfield Dsouza(1)

Gauri(1)

Hari Chandana P(1)

Harish.M(1)

Hindi CinemaBlog(1)

I for an Eye(1)

Ibrahim(1)

Indrani(1)

inquisitiveguurl(1)

IS(1)

Javin Paul(1)

Jean(1)

Jnanaswarupan(1)

K Praveen(1)

Ka Jo(1)

Kalyan P(1)

Kamal Sharma(1)

karanbhujbal(1)

Kichu Khonn(1)

Lakshmi Prabhala(1)

mad madrasi(1)

magiceye(1)

maglomaniac(1)

mahima(1)

mervin anto(1)

mk(1)

monikamanchanda(1)

Mridul Greenwold(1)

Naga(1)

Nanka(1)

Neelakantan Tn(1)

Neelam Dadhwal(1)

Nikhil Sheth(1)

nitya(1)

Nivedita Thadani(1)

PNA(1)

Prakash Jain(1)

Preety(1)

Premkumar Masilamani(1)

Priya Srinivasan(1)

Priyasha(1)

Pushkaraj Shirke(1)

Raji(1)

Ram N(1)

Ram Shiv Murti Yadav(1)

Ramana Murthy Pallela(1)

Rams(1)

Raunak Baral(1)

Renu(1)

Ritu(1)

RNA Corp(1)

Sameena Prathap(1)

Sanjeev(1)

Sankara Subramanian(1)

Santhosh P(1)

Santosh bs(1)

Sasidhar Anne(1)

Shobha(1)

shoOOonya(1)

SJ(1)

SK(1)

Sue(1)

Sunil Jose(1)

Suravi Shome(1)

The knife(1)

udaya chandran(1)

Ugich Konitari(1)

Vasudev Ram(1)

Venkataramanan Ramasethu(1)

Vidya lakshmi(1)

Vikram Karve(1)

Writer @ Serves-You-Write-Team(1)

Yashodhara(1)


garland of Languages of India
an amalgamation of the diversified traditions
gracefully presented with novelty
http://www.haaram.com