PDA

View Full Version : Change post position to program number


JimG
01-15-2013, 09:58 PM
By chance, has anyone created a utility to change the number in the post position field in bris drf and mcp files to the program number?

I ask because there are a few older programs that use the post position field in their readouts. It would be nice to have the saddle cloth number instead.

Jim

Tom
01-16-2013, 07:35 AM
You could open the file and copy the program numbers column where you want it.

JimG
01-16-2013, 10:42 AM
Hi Tom,

Would I do that in excel? Sounds simple enough. I guess I could copy the whole row? I'll play around with it. Why didn't I think of that?

Thanks for replying.

Jim

Tom
01-16-2013, 11:40 AM
I think you open it with Excel 2007 or newer, just copy that whole column and paste it over the other one.

But, I am not sure you can save the file in a usable format...I will try it this afternoon and let you know.

JimG
01-16-2013, 12:00 PM
But, I am not sure you can save the file in a usable format...I will try it this afternoon and let you know.

Tom,

That is exactly where I have run into an issue to this point. Please let me know if you have a solution. Thanks.

Jim

Tom
01-16-2013, 12:46 PM
Did not work with MPH.
Can't get the file back to a .DRF format, even though I got it be comma delimited.

JimG
01-16-2013, 02:21 PM
Did not work with MPH.
Can't get the file back to a .DRF format, even though I got it be comma delimited.

Thanks for trying.

Jim

headhawg
01-16-2013, 04:46 PM
In this section JJMartin created some Excel workbook that might allow you to change the data and save it. Can you make that change using raybo's AllData workbook? I'm not sure. You could always save it as a csv file and then change the extension to .drf. If you import the drf as a text file, Excel shouldn't embed anything weird in it so it should work like a normal drf file after the change.

stuball
01-16-2013, 05:00 PM
I grab the data from Jcapper files...pp is always a numeric field and
Pgnum is always a character field like to accomadate 1A 2B etc I create separate cols for each.
Stuball

hcap
01-16-2013, 05:04 PM
No, you cannot just save it in any text format supported by excel in the usual way. I had to use vba when modifying fields and saving for use in Jcapper which uses csv files extensively. Should work fot other handicapping programs dependent on csv files

Here is the basic routine. You will have to adapt it for your use. I use this in a batch mode to change many fields and many files


Open FName For Output As #nFileNum
For Each myRecord In Range("A10:A" & _
Range("A" & Rows.COUNT).End(xlUp).Row)
With myRecord
For Each myField In Range(.Cells(1), _
Cells(.Row, Columns.COUNT).End(xlToLeft))
sOut = sOut & DELIMITER & myField.Text
Next myField
Print #nFileNum, Mid(sOut, 2)
sOut = Empty
End With
Next myRecord
Close #nFileNum

JimG
01-16-2013, 09:52 PM
Thanks everyone for the replies. Something that would seem easy is certainly harder than I care to deal with on a daily basis. Thanks again.

Jim

hcap
01-17-2013, 01:33 AM
Thanks everyone for the replies. Something that would seem easy is certainly harder than I care to deal with on a daily basis. Thanks again.

JimIs changing the field containing post position to program number the only thing needed? I already have an excel program that changes approx 6 fields to a per-written user input. As mentioned it will do an entire card and a series of cards running in batch mode. Uses excel 2007+.
Do you have 2007 or 2010?

JimG
01-17-2013, 09:20 AM
Is changing the field containing post position to program number the only thing needed? I already have an excel program that changes approx 6 fields to a per-written user input. As mentioned it will do an entire card and a series of cards running in batch mode. Uses excel 2007+.
Do you have 2007 or 2010?

Changing that one field was all I was looking to do. Then I wanted to save the file back to drf or mcp. I have 2010 on my current machine.

Jim

hcap
01-17-2013, 12:55 PM
Changing that one field was all I was looking to do. Then I wanted to save the file back to drf or mcp. I have 2010 on my current machine.

JimIt will take a few days until I get around to it and can make the changes. Haven't used it in a while and forgot that it did another function as well. Have to remove that before I can make your changes.

JimG
01-17-2013, 03:18 PM
It will take a few days until I get around to it and can make the changes. Haven't used it in a while and forgot that it did another function as well. Have to remove that before I can make your changes.

No rush. I do appreciate it.

Jim