I tried creating the ExcelGen.class.asp for exporting of ASP (html) tables t oexcel by using the page http://www.aspfaqs.com/webtech/022801-1.shtml. I am having trouble with it hanging and not giving me an error, or any results. Below is the class and asp page that uses it. I also have an MS Access DB that I have a DSN set up for hitting the data. Does anyone see what is wrong with this? If you need the DB, please email me (sgold@edgewater.com), though it is a very simple one.<BR><BR>Thanks, Steve<BR><BR>ExcelGen.class.asp<BR>=============== ================================================== <BR>&#060;%<BR> Option Explicit<BR><BR> Class ExcelGen<BR><BR> Private objSpreadsheet<BR> Private iColOffset<BR> Private iRowOffset<BR> Private strTmpDir<BR><BR> Sub Class_Initialize()<BR> Set objSpreadsheet = Server.CreateObject("OWC.Spreadsheet")<BR><BR> iRowOffset = 2<BR> iColOffset = 2<BR><BR> &#039;strTmpDir = "C:Inetpubwwwrootspreadsheets\"<BR> strTmpDir = "C:SPGShare\"<BR> End Sub<BR><BR> Sub Class_Terminate()<BR> Set objSpreadsheet = Nothing &#039;Clean up<BR><BR> &#039;Remove out of date spreadsheets<BR> CleanUpSpreadsheets<BR> End Sub<BR><BR><BR> Public Property Let ColumnOffset(iColOff)<BR> If iColOff &#062; 0 then<BR> iColOffset = iColOff<BR> Else<BR> iColOffset = 2<BR> End If<BR> End Property<BR><BR> Public Property Let RowOffset(iRowOff)<BR> If iRowOff &#062; 0 then<BR> iRowOffset = iRowOff<BR> Else<BR> iRowOffset = 2<BR> End If<BR> End Property<BR><BR><BR> Sub GenerateWorksheetFromRecordset(objRS, bolAutofitColumns)<BR><BR> &#039;Populates the Excel worksheet based on a Recordset&#039;s contents<BR> &#039;Start by displaying the titles<BR> If objRS.EOF then Exit Sub<BR><BR> Dim objField, iCol, iRow, iMaxColVal<BR> iCol = iColOffset<BR> iRow = iRowOffset<BR><BR> For Each objField in objRS.Fields<BR> objSpreadsheet.Cells(iRow, iCol).Value = objField.Name<BR> objSpreadsheet.Cells(iRow, iCol).Font.Bold = True<BR> objSpreadsheet.Cells(iRow, iCol).Font.Underline = True<BR><BR> iCol = iCol + 1<BR> Next &#039;objField<BR><BR> iMaxColVal = iCol - 1<BR><BR> &#039;Display all of the data<BR> Do While Not objRS.EOF<BR> iRow = iRow + 1<BR> iCol = iColOffset<BR><BR> For Each objField in objRS.Fields<BR> If IsNull(objField.Value) then<BR> objSpreadsheet.Cells(iRow, iCol).Value = ""<BR> Else<BR> objSpreadsheet.Cells(iRow, iCol).Value = objField.Value<BR> End If<BR><BR> iCol = iCol + 1<BR> Next &#039;objField<BR><BR> objRS.MoveNext <BR> Loop<BR><BR><BR> If bolAutofitColumns then &#039;autofit columns<BR> For iCol = iColOffset to iMaxColVal<BR> objSpreadsheet.Columns(iCol).AutoFitColumns<BR> Next<BR> End If<BR> End Sub <BR><BR><BR> Function SaveWorksheet(strFileName)<BR> &#039;Save the worksheet to a specified filename<BR> On Error Resume Next<BR> Call objSpreadsheet.ActiveSheet.Export(strFileName, 0)<BR><BR> SaveWorksheet = (Err.Number = 0)<BR> End Function<BR><BR><BR> Sub StreamWorksheet()<BR> &#039;Save the worksheet in a temporary file<BR> Dim strFileName, objFSO<BR><BR> Set objFSO = Server.CreateObject("Scripting.FileSystemObject")< BR> strFileName = strTmpDir & objFSO.GetBaseName(objFSO.GetTempName) & ".xls"<BR> Set objFSO = Nothing<BR><BR> if SaveWorksheet(strFileName) then<BR> Response.Redirect strFileName<BR> end if<BR> End Sub<BR><BR><BR> Private Sub CleanUpSpreadsheets()<BR> Dim objFS<BR> Dim objFolder<BR> Dim objFile<BR><BR> set objFS = Server.CreateObject("Scripting.FileSystemObject")< BR> set objFolder = objFS.GetFolder(strTmpDir)<BR> <BR> &#039;Loop through each file in the strTmpDir folder<BR> for each objFile in objFolder.Files<BR> &#039;Delete Spreadsheets older than 10 minutes<BR> If DateDiff("n", objFile.DateLastModified, now) &#062; 10 then<BR> objFS.DeleteFile strTmpDir & objFile.Name, True<BR> end if<BR> next<BR><BR> set objFolder = nothing<BR> set objFS = nothing<BR> End Sub<BR><BR><BR> End Class<BR>%&#062;<BR><BR><BR>====================== =========================================<BR>Outpu tToExcel.asp<BR>================================== =============================<BR>&#060;!--#include file="ExcelGen.class.asp"--&#062;<BR>&#060;%<BR> &#039;Grab the Recordset we wish to display in a spreadsheet<BR>&#039; Dim objRS, strSQL<BR>&#039; strSQL = "Select EventID, Day, HourStart, MinuteStart, HourEnd, MinuteEnd, EventTitle from Event Order by Day, HourStart, MinuteStart, HourEnd, MinuteEnd ASC"<BR> <BR>&#039; Set objRS = Server.CreateObject("ADODB.Recordset")<BR>&#039; objRS.Open strSQL, strSQL, "DSN=CalendarEvents"<BR><BR><BR>Dim objConn<BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>objConn .ConnectionString = "DSN=CalendarEvents"<BR>objConn.Open<BR><BR>Di m strSQL<BR>strSQL = "Select EventID, Day, HourStart, MinuteStart, HourEnd, MinuteEnd, EventTitle from Event Order by Day, HourStart, MinuteStart, HourEnd, MinuteEnd ASC"<BR><BR>Dim objRS<BR>Set objRS = Server.CreateObject("ADODB.RecordSet")<BR>objRS.Op en strSQL, strSQL, objConn<BR><BR><BR><BR> &#039;Create an instance of the ExcelGen class<BR> Dim objExcel<BR> Set objExcel = New ExcelGen<BR><BR> &#039;Set the Row/Column offsets<BR> objExcel.RowOffset = 3<BR> objExcel.ColumnOffset = 1<BR><BR> &#039;Dump the recordset contents to the spreadsheet and <BR> &#039;AutoFit the columns<BR> objExcel.GenerateWorksheetFromRecordset objRS, True<BR><BR> &#039;Stream the spreadsheet to the user<BR> objExcel.StreamWorksheet<BR><BR> &#039;Clean up!<BR> Set objExcel = Nothing<BR><BR> objRS.Close<BR> Set objRS = Nothing<BR>%&#062;<BR><BR>