#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2017
    Posts
    1
    Rep Power
    0

    How to insert strings from Excel (Excel-vba?) into a html template to create custom h


    After manually copying and pasting pretty much the same code into over a 100 html files after the original landing page design changed, I'm thinking there has to be an easier way to do this. I'm guessing that Excel-vba could be the answer but I just don't know much about vba to create my own functions.

    I was hoping some kind folk on here could help.

    The only things really different in each page are the CTA links, the tracking code, and sometimes the landing page template itself for A/B testing.

    The marketers are compiling spreadsheets to track all their landing page variations anyway so we could use this data instead of manually copying and pasting.

    These are the general Excel fields:
    Html_template (e.g. control.html or test.html)
    Tracking_code (e.g. COS2223US)
    Cta_link1 (e.g. https://example.com/joinnow)
    File_output_name (e.g. joinnow.html)

    Then we just press a button when ready to generate the individual output files.

    I don't want to use js or php as I'd like it to be easy for the marketers to press the button themselves. The coders can then just focus on creating the templates. Oh wouldn't that be nice!!
  2. #2
  3. Lazy Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,436
    Rep Power
    9645
    Welcome to Dev Shed. Thing is, since this is your first post and all, we don't know anything about you. About you, your site, your landing page redesign, these CTA links and tracking codes, who the marketers are and what their spreadsheets are about... I could keep going. Point is, you know far more about what you have to work with than we do.

    All I can do is guess, and right now my best guess is that you want to be able to generate pages on the site ("joinnow.html") according to a template ("something.html"). I'm not sure how the tracking code is involved.
    So, how does everything - the spreadsheet, the copy/pasting, the website/landing page, all that - work now?

    But I can say that there's a really good chance I'm going to suggest not doing what you've described. Giving non-techies the ability to change content on a site is one thing, but giving them a tool that grants full control over the HTML source will eventually backfire. It'll probably end up with a server-side language (like PHP, not Javascript) but I bet I can make a good case as to why it's worth the extra effort.

IMN logo majestic logo threadwatch logo seochat tools logo