In my new role, I process data extracts from a Predictive Dialer, the format is basic .xls (meaning all columns are essentially formatted as General with hidden apostrophes).
If you don't know about hidden apostrophes, you might see a value like 100 but it is actually a char, and using Excel formatting to make it a number FAILS. You have to essentially copy it and paste it back as itself*1....
This was normally done manually, but I am putting together an XLClean compiled script...
and that is the easy part. Another column comes in as say 00:24:16 - but in General format cannot be converted to DateTime. The current process is to create a formula that is
00:24:16[the cell value]/0.041666667 {which we all know is 5/12.... ha! ha!}... to obtain the numeric time as percentage of an hour. This is computed in a separate column, copied down then pasted back as values then copied and pasted to original column as values, then column is deleted
anyway... My Winbatch script has to process all rows with the following: NOTE: tOff refers to the column offset as the data can appear in different columns depending upon the query export.
v = oWS.Cells(r,tOff).Value:""
v1 = (Int(ItemExtract(1,v,":"))*3600 + Int(ItemExtract(2,v,":"))*60 + Int(ItemExtract(3,v,":")))
v1=(v1*1.000000000)/(3600*1.000000000)
oWS.Cells(r,tOff).Value=v1
Which equals the same value and same number of decimal places as the manual process/fomula.
The issue is the data often contains more than 20,000 rows and the WB script takes often 10 minutes to complete, whereas doing it manually takes a lot less.
I have tried to write macros to copy the range and convert all and then move to WB, but failed.
Anyone?