I am writing out an excet file from a dataset..<BR>It all seem to work but when I actually try to save the file it hangs...<BR>Any IDEA....<BR><BR><BR> Excel.Application ExcelObj = new Excel.Application();<BR> <BR> DataSet dataSet = getUsers();<BR> <BR><BR> ExcelObj.Application.Workbooks.Add(true);<BR> int rowIndex=1;<BR> int colIndex=0;<BR><BR> foreach(DataColumn col in dataSet.Tables["usersXP"].Columns) <BR> { <BR><BR> colIndex++; ExcelObj.Cells[1,colIndex]=col.ColumnName; <BR><BR> } <BR><BR> foreach(DataRow row in dataSet.Tables["usersXP"].Rows) <BR> { <BR><BR> rowIndex++; colIndex=0; <BR><BR> foreach(DataColumn col in dataSet.Tables["usersXP"].Columns) <BR> { <BR><BR> colIndex++; ExcelObj.Cells[rowIndex,colIndex]=row[col.ColumnName].ToString(); <BR><BR> } <BR> <BR> } <BR> <BR> //ExcelObj.Visible = true;<BR> <BR> ExcelObj.Save("XpAddress.xls");