Problema en Web
Publicado por Ivan Gabriel (24 intervenciones) el 18/11/2009 18:18:17
Hola que tal. Buenas tardes Foristas como les va??? Con una molestia, estoy tratando de
(trabajo con GeneXus X, SQL 200, en .NET, tengo, OFFICE 2007)
hacer una exportacion a excel, y ya tengo todo (eso pienso) , tengo este codigo:
&Filename = 'CustomerExcelExport.xls'
&ExcelDocument.UseAutomation = 0
//&ret=OpenDocument('C:\excel\CustomerExcelExport.xls')
&ExcelDocument.Open(&Filename)
&ExcelDocument.Show()
Do 'CheckStatus'
&ExcelDocument.Clear()
&CellRow = 1
&FirstColumn = 1
// Write titles
&ExcelDocument.Cells(&CellRow, &FirstColumn + 0).Bold = 1
&ExcelDocument.Cells(&CellRow, &FirstColumn + 0).Text = 'Customer Id'
&ExcelDocument.Cells(&CellRow, &FirstColumn + 1).Bold = 1
&ExcelDocument.Cells(&CellRow, &FirstColumn + 1).Text = 'Customer Name'
&ExcelDocument.Cells(&CellRow, &FirstColumn + 2).Bold = 1
&ExcelDocument.Cells(&CellRow, &FirstColumn + 2).Text = 'Customer Birth Date'
For each
// Write cell values
&CellRow += 1
&ExcelDocument.Cells(&CellRow, &FirstColumn + 0).Number = CustomerId
&ExcelDocument.Cells(&CellRow, &FirstColumn + 1).Text = CustomerName
&ExcelDocument.Cells(&CellRow, &FirstColumn + 2).Date = CustomerBirthDate
Endfor
&ExcelDocument.Save()
Do 'CheckStatus'
&ExcelDocument.Close()
Sub 'CheckStatus'
If (&ExcelDocument.ErrCode <> 0)
&Filename = ""
&ErrorMessage = &ExcelDocument.ErrDescription
&ExcelDocument.Close()
Return
Endif
Endsub
Este codigo lo encontre en una pagina de Wiki de GeneXus X , creo que todo esta bien, y corre sin mandarme ningun error pero cuando estoy en modo WEB, y lo ejecuto se queda pensando la pagina, creen que puedan ayudarme?????
Si, si se los agradeseria mucho, Muchas gracias! cuidense chao!
(trabajo con GeneXus X, SQL 200, en .NET, tengo, OFFICE 2007)
hacer una exportacion a excel, y ya tengo todo (eso pienso) , tengo este codigo:
&Filename = 'CustomerExcelExport.xls'
&ExcelDocument.UseAutomation = 0
//&ret=OpenDocument('C:\excel\CustomerExcelExport.xls')
&ExcelDocument.Open(&Filename)
&ExcelDocument.Show()
Do 'CheckStatus'
&ExcelDocument.Clear()
&CellRow = 1
&FirstColumn = 1
// Write titles
&ExcelDocument.Cells(&CellRow, &FirstColumn + 0).Bold = 1
&ExcelDocument.Cells(&CellRow, &FirstColumn + 0).Text = 'Customer Id'
&ExcelDocument.Cells(&CellRow, &FirstColumn + 1).Bold = 1
&ExcelDocument.Cells(&CellRow, &FirstColumn + 1).Text = 'Customer Name'
&ExcelDocument.Cells(&CellRow, &FirstColumn + 2).Bold = 1
&ExcelDocument.Cells(&CellRow, &FirstColumn + 2).Text = 'Customer Birth Date'
For each
// Write cell values
&CellRow += 1
&ExcelDocument.Cells(&CellRow, &FirstColumn + 0).Number = CustomerId
&ExcelDocument.Cells(&CellRow, &FirstColumn + 1).Text = CustomerName
&ExcelDocument.Cells(&CellRow, &FirstColumn + 2).Date = CustomerBirthDate
Endfor
&ExcelDocument.Save()
Do 'CheckStatus'
&ExcelDocument.Close()
Sub 'CheckStatus'
If (&ExcelDocument.ErrCode <> 0)
&Filename = ""
&ErrorMessage = &ExcelDocument.ErrDescription
&ExcelDocument.Close()
Return
Endif
Endsub
Este codigo lo encontre en una pagina de Wiki de GeneXus X , creo que todo esta bien, y corre sin mandarme ningun error pero cuando estoy en modo WEB, y lo ejecuto se queda pensando la pagina, creen que puedan ayudarme?????
Si, si se los agradeseria mucho, Muchas gracias! cuidense chao!
Valora esta pregunta


0