Pages:
Actions
  • #1 by racepro on 08 Mar 2022
  • Hi,
    Does anyone have any ideas on how to automatically apply double quotes in a Notepad text file ?
    Quite a tedious process doing it manually for sometimes dozens of bets.
    Cheers 
  • #2 by MarkV on 08 Mar 2022
  • Hi
    Just tried a few things, came up with a several stage process:

    prepare an Excel sheet:

    A                      B                          C
    selection name   imported_1 value   imported_2 value

    highlight column A cells. Right-click and choose Format Cells
    On the Number tab choose Custom  
    In the Type: field put \"@\" and click OK
    Save the file as Tab delimited text

    Open the saved text file in Notepad. It should be tab delimited.
    the selection names are enclosed in """Three Quotes"""
    Edit, Replace, Find what: """, Replace with "
    Click Replace All
    Save text file

    It gets easier after you've done it a few times ;)  
  • #3 by racepro on 09 Mar 2022
  • Hi Mark,

    Thanks for that. It worked a bit better for me. Perfect in fact, as under:

    "Mcqueen"
    "bill bell"

    Cheers

    Ian
  • #4 by Wez on 10 Apr 2022
  • Hi,

    With a tiny bit of effort, the below will speed things up for you.  I use this every day, pretty much, to create a selections file for my triggers.

    With reference to the attachments.
    One is a screen shot of what the spreadsheet looks like should you wish to recreate it.
    I have also attached a copy of the spreadsheet I created for you to use directly.

    The formulae assume the list of names are in Col C, starting at C3

    Cell H3 formula =CONCAT("~",C3,"~")
    This puts ~ either side of the name

    Cell G3 formula =REPLACE(H3,1,1,"""")
    This replaces the first ~ with double quotes

    Cell F3 formula =REPLACE(G3,FIND("~",G3),1,"""")
    This replaces the second ~ with double quotes

    Cell E3 formula =IFERROR(REPLACE(F3,FIND("'",F3),1,""),F3)
    This removes any single quotes as sometimes found in horse names
    e.g. King's Advice becomes Kings Advice
    Why? Because MFP won't accept ' in a text file selection's name!

    Select and drag the formulae from row 3 down as needed.
    All the names now in column E (highlighted in grey) can be selected in en-masse and pasted into a text file.

    Hope that helps,

    regards

    Wez
  • #5 by racepro on 10 Apr 2022
  • Hi Wez,

    Thanks for your detailed solutions. 
    I have used the below formula for a few years to strip off those nasty hieroglyphics and make the names
    compatible with Betfair. It works a treat and never had a single problem in 5+years.
      PROPER(SUBSTITUTE(SUBSTITUTE(LEFT(EP14,IFERROR(FIND("(",EP14)-1,LEN(EP14))),"`",""),"'","")))

    With regards to the double quotes, the solution Mark provided \"@\" has worked well. It can be stored in the
    formatting under number/custom. However if there are any updates the \"@\" gets overwritten so it pays
    to keep a copy handy on the spreadsheet. It only is used if the data range loses its formatting which is rare.

    Cheers and Good Luck

    Ian
  • #6 by Wez on 10 Apr 2022
  • Hi Ian,

    thanks for that.

    It has led me to simplify mine even further as a result!

    Assuming the name is in cell S4

    =CONCAT(CONCAT("""",SUBSTITUTE(SUBSTITUTE(LEFT(S4,LEN(S4)),"`",""),"'","")),"""")

    this now yields the name in double quotes and takes care of any single quotes.

    Many thanks for the info/idea,

    regards

    Wez
Pages:
Actions