logo

New Response

« Return to the blog entry

You are replying to:

    • avatar
    • ipinky7
    • Posted on Fri 13 Jul 2012 07:44 AM

    you call this a ProTip?

    why not do it really fancy...

    and just use 1 step!

    you can search for (.*)\n which will find all text until the end of the line

    you can replace with "$1"\n (sometimes, depending on the editor $1 has to be replaced with \1

    then you only need one step!

    You can actually create full code with this technique! We use it to create code to import from Excel

    source (can be easily created, by concatenating columns, in Excel and even maintained by a customer for easy maintenance) is something like:

    columnId@@@Fieldname@@@FieldType

    resulting source code is a list of Types

    Type importField

    columnId as string

    fieldName as string

    fieldType as string ' can be used for conversions if needed

    end Type

    dim importFields list as importField

    'from here it's the auto generated code as per technique explained above

    set thisImportField = new importField

    thisImportField.columndId = "A"

    thisImportField.fieldName = "Firstname"

    thisImportField.fieldType = "String"

    that way you can create an import setup script with 500 lines in 15 min

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: