Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: mk sharma
  Where is mk sharma?
 mumbai
 India
 mk sharma
 To: Vilhelm-Ion Praisach
  Where is Vilhelm-Ion Praisach?
 Resita
 Romania
 Vilhelm-Ion Praisach
 Tags
Subject: RE: copy dbf to xlsx
Thread ID: 414311 Message ID: 416333 # Views: 74 # Ratings: 0
Version: Not Applicable Category: General VFP Topics
Date: Saturday, December 27, 2014 6:50:24 AM         
   


> >
> > Thank you,
> > Very useful Tips
> >
> >
> > Warm Regards,
> > mk.
>
> Thank yo :-)
> Another tenth of a second can be obtained by using == instead of =
>
>
CLEAR 
> aa = VARTYPE(DATETIME())
> 
> ttt = SECONDS()
> FOR lni=1 TO 1000000
> 	DO CASE 
> 	CASE aa $ "CV"
> 		= 0
> 	CASE aa = "I"
> 		= 1
> 	CASE aa $ "NF"
> 		= 2
> 	CASE aa = "D"
> 		= 3
> 	CASE aa = "T"
> 		= 4
> 	ENDCASE
> NEXT
> ? SECONDS() - ttt
> 
> ttt = SECONDS()
> FOR lni=1 TO 1000000
> 	DO CASE 
> 	CASE aa $ "CV"
> 		= 0
> 	CASE aa == "I"
> 		= 1
> 	CASE aa $ "NF"
> 		= 2
> 	CASE aa == "D"
> 		= 3
> 	CASE aa == "T"
> 		= 4
> 	ENDCASE
> NEXT
> ? SECONDS() - ttt

>
> Respectfully



** Speed Test (INSERT is Fastest, One REPLACE is Second and Individual REPLACE is Slowest)
** Individual REPLACE commands, One REPLACE command and The INSERT command
Clear
Set Status Off
Set Status Bar On
Set Talk On  && Change this to OFF for faster REPLACE's.

Create Table bigtable ;
   (Fld1 c(10), ;
     Fld2 c(10), ;
     Fld3 c(10), ;
     Fld4 c(10), ;
     Fld5 c(10), ;
     Fld6 i, ;
     Fld7 i, ;
     Fld8 i, ;
     Fld9 i, ;
     Fld10 i)
Use bigtable
Clear
beg_counter = Seconds()
For x = 1 To 5000
   Append Blank
   Replace Fld1 With 'aaaaa' + Alltrim(Str(x))
   Replace Fld2 With 'bbbbb' + Alltrim(Str(x))
   Replace Fld3 With 'ccccc' + Alltrim(Str(x))
   Replace Fld4 With 'ddddd' + Alltrim(Str(x))
   Replace Fld5 With 'eeeee' + Alltrim(Str(x))
   Replace Fld6 With x
   Replace Fld7 With x
   Replace Fld8 With x
   Replace Fld9 With x
   Replace Fld10 With x
Endfor
counter = Seconds() - beg_counter
? "Individual REPLACE commands took: " + Alltrim(Str(counter, 4, 2)) + "    seconds."

beg_counter = Seconds()
For x = 1 To 5000
   Append Blank
   Replace	Fld1 With 'aaaaa' + Alltrim(Str(x)), ;
		   Fld2	 With 'bbbbb' + Alltrim(Str(x)), ;
		   Fld3	 With 'ccccc' + Alltrim(Str(x)), ;
		   Fld4	 With 'ddddd' + Alltrim(Str(x)), ;
		   Fld5	 With 'eeeee' + Alltrim(Str(x)), ;
		   Fld6	 With x, ;
		   Fld7	 With x, ;
		   Fld8	 With x, ;
		   Fld9	 With x, ;
		   Fld10 With x

Endfor
counter = Seconds() - beg_counter
? "One REPLACE command: " + Alltrim(Str(counter, 4, 2)) + " seconds."
beg_counter = Seconds()
For x = 1 To 5000
   Insert Into bigtable (Fld1, Fld2, Fld3, ;
        Fld4, Fld5, Fld6, ;
        Fld7, Fld8, Fld9, ;
        Fld10) Values ('aaaaa' + ;
        Alltrim(Str(x)), 'bbbbb' + ;
        Alltrim(Str(x)), 'ccccc' + ;
        Alltrim(Str(x)), 'ddddd' + ;
        Alltrim(Str(x)), 'eeeee' + ;
        Alltrim(Str(x)), x, x, x, x, x)
Endfor
counter = Seconds() - beg_counter
? "The INSERT command: " + Alltrim(Str(counter, 4, 2)) + " seconds."



Warm Regards,
mk.

ENTIRE THREAD

copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 11/10/2014 12:09:27 AM
RE: copy dbf to xlsx Posted by Martina Jindrov√° @ 11/10/2014 7:57:39 AM
RE: copy dbf to xlsx Posted by Martina Jindrov√° @ 11/10/2014 12:42:44 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 11/10/2014 3:37:44 PM
RE: copy dbf to xlsx Posted by chaim dudi @ 11/10/2014 5:05:40 PM
RE: copy dbf to xlsx Posted by Cesar @ 11/10/2014 5:25:44 PM
RE: copy dbf to xlsx Posted by chaim dudi @ 11/10/2014 5:33:03 PM
RE: copy dbf to xlsx Posted by Cesar @ 11/10/2014 6:11:27 PM
RE: copy dbf to xlsx Posted by Anders Altberg @ 11/10/2014 11:45:54 PM
RE: copy dbf to xlsx Posted by Tore Bleken @ 11/10/2014 5:30:27 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 11/18/2014 4:29:35 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 11/18/2014 8:14:10 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 11/19/2014 9:29:41 AM
RE: copy dbf to xlsx Posted by Cesar @ 11/19/2014 10:51:32 AM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 11/19/2014 11:02:09 AM
RE: copy dbf to xlsx Posted by Cesar @ 11/19/2014 6:36:56 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 11/19/2014 5:34:44 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 11/20/2014 12:27:18 PM
RE: copy dbf to xlsx Posted by Glen Villar @ 12/3/2014 11:51:36 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 11/20/2014 7:59:31 PM
RE: copy dbf to xlsx Posted by mk sharma @ 11/21/2014 6:20:02 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 11/21/2014 7:27:51 PM
RE: copy dbf to xlsx Posted by mk sharma @ 12/27/2014 6:50:24 AM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 11/21/2014 7:23:09 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 11/27/2014 9:39:20 AM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 12/5/2014 8:24:55 PM
RE: copy dbf to xlsx Posted by cata bard @ 12/6/2014 12:38:13 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 12/6/2014 11:10:58 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 12/7/2014 6:46:33 PM
RE: copy dbf to xlsx Posted by khubaib khalid @ 12/8/2014 12:32:45 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 12/8/2014 12:46:38 PM
RE: copy dbf to xlsx Posted by khubaib khalid @ 12/8/2014 1:19:53 PM
RE: copy dbf to xlsx Posted by Naeem Afzal @ 12/25/2014 7:09:54 AM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 12/8/2014 9:56:18 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 12/22/2014 10:09:36 PM
RE: copy dbf to xlsx Posted by Bernard Bout @ 12/24/2014 4:25:13 AM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 12/24/2014 8:10:39 AM
RE: copy dbf to xlsx Posted by Bernard Bout @ 12/26/2014 8:18:05 AM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 12/26/2014 11:18:41 AM
RE: copy dbf to xlsx Posted by Jun Tangunan @ 12/26/2014 11:33:09 AM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 12/26/2014 11:54:48 AM
RE: copy dbf to xlsx Posted by Bernard Bout @ 12/27/2014 5:42:17 AM
RE: copy dbf to xlsx Posted by Cesar @ 2/20/2015 3:08:59 PM
RE: copy dbf to xlsx Posted by Glen Villar @ 2/22/2015 1:12:20 AM
RE: copy dbf to xlsx Posted by tom knauf @ 2/20/2015 2:48:08 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 2/20/2015 4:15:22 PM
RE: copy dbf to xlsx Posted by tom knauf @ 2/20/2015 5:06:16 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 2/20/2015 5:52:46 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 6/13/2015 8:07:49 PM
RE: copy dbf to xlsx Posted by Tony Vignone @ 6/19/2015 4:34:05 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 6/19/2015 5:02:59 PM
RE: copy dbf to xlsx Posted by Tony Vignone @ 6/19/2015 7:27:58 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 12/2/2015 4:25:05 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 12/3/2015 3:56:49 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 12/5/2015 11:12:23 AM
RE: copy dbf to xlsx Posted by Koen Piller @ 12/5/2015 1:14:31 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 12/7/2015 7:59:01 AM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 1/1/2016 8:07:08 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 1/23/2016 12:12:37 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 1/24/2016 11:07:52 AM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 6/2/2016 5:55:48 PM
RE: copy dbf to xlsx Posted by Koen Piller @ 9/19/2016 12:22:46 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 9/19/2016 10:46:26 AM
RE: copy dbf to xlsx Posted by David Kurniawan @ 9/20/2016 1:47:26 AM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 9/20/2016 7:11:25 AM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 11/2/2016 10:15:26 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 11/21/2016 11:55:00 AM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 1/10/2017 12:52:40 PM
RE: copy dbf to xlsx Posted by Koen Piller @ 1/10/2017 5:54:04 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 1/10/2017 8:47:45 PM
RE: copy dbf to xlsx Posted by Koen Piller @ 1/11/2017 4:20:20 PM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 1/11/2017 6:21:39 PM
RE: copy dbf to xlsx Posted by Noel Cris @ 1/11/2017 5:09:01 AM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 1/11/2017 8:46:30 AM
RE: copy dbf to xlsx Posted by Vilhelm-Ion Praisach @ 4/21/2017 9:34:12 AM