
Problema en exportar datos al EXCEL
Publicado por Rafa (21 intervenciones) el 11/03/2010 20:16:16
Hola que tal, yo de nuevo jejeje bueno resulta k tengo otro dilema jejeje, miren estoy tratando de mandar la info de un reporte a un archivo de excel, miren si me sale bien y toda la cosa, nada mas k cuando kiero agregar un campo de la tabla temporal de tipo NUMERICO a un registro de EXCEL, si el numero es demaciado grande, en el excel me pone 2.11E+12, desborde numerico has de cuenta, como le ago para k me ponga el numero real eje. 121252536356.
Asi es mi codigo: EL CAMPO FOLIO ES EL K SE DESBORDA.
local Fila
wait'Espere Un Momento Exportando Datos' window nowait
_screen.mousepointer=14
TmpSheet=GetObject('','Excel.Sheet')
XLApp=TmpSheet.Application
XLApp.visible=.T.
XLApp.workbooks.add()
XLSheet=XLApp.ActiveSheet
XLSheet.Cells(2,2)="Folio"
XLSheet.Cells(2,2).font.bold=.T.
XLSheet.Cells(2,2).font.size="12"
XLSheet.Cells(2,2).font.name="Arial"
XLSheet.Cells(2,3)="Ciclo"
XLSheet.Cells(2,3).font.bold=.T.
XLSheet.Cells(2,3).font.size="12"
XLSheet.Cells(2,3).font.name="Arial"
XLSheet.Cells(2,4)="Fec Entrega"
XLSheet.Cells(2,4).font.bold=.T.
XLSheet.Cells(2,4).font.size="12"
XLSheet.Cells(2,4).font.name="Arial"
sele rep
Fila=4
scan
XLSheet.Cells(Fila,2)=folio
XLSheet.Cells(Fila,3)=alltrim(ciclo)
XLSheet.Cells(Fila,4)=fec_ent
Fila=Fila+1
endscan
XLSheet.Columns("A:A").ColumnWidth = 2
XLSheet.Columns("B:B").EntireColumn.AutoFit
XLSheet.Columns("C:C").EntireColumn.AutoFit
_screen.mousepointer=0
Asi es mi codigo: EL CAMPO FOLIO ES EL K SE DESBORDA.
local Fila
wait'Espere Un Momento Exportando Datos' window nowait
_screen.mousepointer=14
TmpSheet=GetObject('','Excel.Sheet')
XLApp=TmpSheet.Application
XLApp.visible=.T.
XLApp.workbooks.add()
XLSheet=XLApp.ActiveSheet
XLSheet.Cells(2,2)="Folio"
XLSheet.Cells(2,2).font.bold=.T.
XLSheet.Cells(2,2).font.size="12"
XLSheet.Cells(2,2).font.name="Arial"
XLSheet.Cells(2,3)="Ciclo"
XLSheet.Cells(2,3).font.bold=.T.
XLSheet.Cells(2,3).font.size="12"
XLSheet.Cells(2,3).font.name="Arial"
XLSheet.Cells(2,4)="Fec Entrega"
XLSheet.Cells(2,4).font.bold=.T.
XLSheet.Cells(2,4).font.size="12"
XLSheet.Cells(2,4).font.name="Arial"
sele rep
Fila=4
scan
XLSheet.Cells(Fila,2)=folio
XLSheet.Cells(Fila,3)=alltrim(ciclo)
XLSheet.Cells(Fila,4)=fec_ent
Fila=Fila+1
endscan
XLSheet.Columns("A:A").ColumnWidth = 2
XLSheet.Columns("B:B").EntireColumn.AutoFit
XLSheet.Columns("C:C").EntireColumn.AutoFit
_screen.mousepointer=0
Valora esta pregunta


0