La Forma mas rapida de DBF to EXCEL

La Forma mas rapida de DBF to EXCEL

Postby VitalJavier » Thu Dec 05, 2019 8:01 pm

Hola buen dia a Todos
Pues eso, estoy tratando de pasar datos de una dbf
a excel y se tarda , la cantidad de registros es un promedio de
300,000

Code: Select all  Expand view  RUN

oExce := CreateObject( "Excel.Application" )
oBook := oExce:WorkBooks:Add()
oShee := oBook:WorkSheets(1)
oHoja  := oExce:ActiveSheet
 


y hago un barrido de la tabla con un DO WHILE !Eof()

Alguien me podria echar una mano
Gracias por su tiempo.
User avatar
VitalJavier
 
Posts: 241
Joined: Mon Jun 10, 2013 6:40 pm

Re: La Forma mas rapida de DBF to EXCEL

Postby cnavarro » Thu Dec 05, 2019 8:37 pm

Has probado la function FW_DbfToExcel() ?
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: La Forma mas rapida de DBF to EXCEL

Postby Silvio.Falconi » Fri Dec 06, 2019 10:11 am

Mr Cristobal, there are problems, do you Know it ?
viewtopic.php?f=3&t=38104&start=0
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7086
Joined: Thu Oct 18, 2012 7:17 pm

Re: La Forma mas rapida de DBF to EXCEL

Postby cnavarro » Fri Dec 06, 2019 10:40 am

Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: La Forma mas rapida de DBF to EXCEL

Postby Silvio.Falconi » Fri Dec 06, 2019 3:40 pm

Cris,

the problem is another

on my application I load the oRange

oRange := GetExcelRange(cFileXls , , @lOpened)

it load good the excel file

then I must save all into a dbf and I have problem using FW_DbfToExcel() because this function use at the end the function FW_ArrayToDBF

here there is the problem I explain on topic viewtopic.php?f=3&t=38104&start=0

then I founded ( for now a good solution) to resolve this problem with two easy commands

Create a dialog with a Xbrowse

Code: Select all  Expand view  RUN
@ 1,2 xbrowse oBrowse ARRAY oRange  ;
   SIZE 100,62 PIXEL STYLE FLAT NOBORDER


put on dialog a button to create a dbf from oXbrowse with the comman ToDbf()

Code: Select all  Expand view  RUN
@ 1,2 button oBtnDbf Prompt "Conversione" size 120,20 ;
                   of oDlg action (oBrowse:ToDbf(cFileDbf),  oDlg:end( IDOK ) )
 


then I have the same result

perhaps there is an error on FW_ExcelToDbf function

because I load the excel file the same command

oRange := GetExcelRange(cFileXls , , @lOpened)

and it save on range the exactly records
the error is then from line 229 to line 271 of FW_ExcelToDbf function

because it converte the row with the columns I not Know why and it create the problem

perhpas the command DEFAULT oRange := GetExcelRange() with no parameters change something ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7086
Joined: Thu Oct 18, 2012 7:17 pm

Re: La Forma mas rapida de DBF to EXCEL

Postby Silvio.Falconi » Fri Dec 06, 2019 4:20 pm

Cris found the solution see the email
Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7086
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 42 guests