Here is a simple code if you wish which can get you off to the right
start if required:
Excel.ApplicationClass excel = new ApplicationClass();
excel.Application.Workbooks.Add(true);
DataTable table = DATASETNAME.Tables[0];
int ColumnIndex=0;
foreach(Datacolumn col in table.Columns)
{
ColumnIndex++;
excel.Cells[1,ColumnIndex]=col.ColumnName;
}
int rowIndex=0;
foreach(DataRow row in table.Row)
{
rowIndex++;
ColumnIndex=0;
foreach(DataColumn col in table.Columns)
{
ColumnIndex++;
excel.Cells[rowIndex+1,ColumnIndex]=row.Cells
[col.ColumnName].Text;
}
}
excel.Visible = true;
Worksheet worksheet = (Worksheet)excel.ActiveSheet;
worksheet.Activate();
)
On Apr 3, 2:08 am, [email protected] wrote:
> Hi
>
> I want to export data from dataset to excel in windows application (.Net
> 2005) using xslt. Can any one help me.
>
> Note:- Please provide solution for Windows Application not for web
> application.
>
> Thanks In Advance.
>
> Regards
> Kapil