jwu1023
March 21st, 2006, 06:07 PM
Dear all,
After I assinged the values to an in memory Excel worksheet, I liked to send it to the client side and let the user save it as an Excel file. The following is part of my code:
qxlws.Range((excelCol.data(1)) & CStr(1)).Value = dt.Tables(0).Columns(1).ColumnName
qxlws.Range((excelCol.data(1)) & CStr(2)).Value = dt.Tables(0).Columns(2).ColumnName
Response.ContentType = "application/vnd.ms-excel"
Response.Write(qxlws)
Response.End()
But when I opened the saved Excel file, it only shows "System._ComObject".
Anyone can help me with it is highly appreciated.
After I assinged the values to an in memory Excel worksheet, I liked to send it to the client side and let the user save it as an Excel file. The following is part of my code:
qxlws.Range((excelCol.data(1)) & CStr(1)).Value = dt.Tables(0).Columns(1).ColumnName
qxlws.Range((excelCol.data(1)) & CStr(2)).Value = dt.Tables(0).Columns(2).ColumnName
Response.ContentType = "application/vnd.ms-excel"
Response.Write(qxlws)
Response.End()
But when I opened the saved Excel file, it only shows "System._ComObject".
Anyone can help me with it is highly appreciated.