Home > Back-end >  Google Sheets script: swap URLs
Google Sheets script: swap URLs

Time:10-14

I have a Google Sheet that links out to several areas in another app. I was informed that the app is going to have its URL changed, and I was wondering if there's a way to script something to easily update the links in my sheet.

While the domain of the URL will be changing, the trailing information will remain the same. Here's an example:

  • Current URL structure
    • currenturl.app.com/folder/item.html
  • New URL structure
    • newurl.app.com/folder/item.html

Is there a way that I can just search my file for currenturl.app.com and change that to newurl.app.com, and leave the /folder/item.html in place using a Google script?

Any help would be greatly appreciated, manually updating each link is going to take forever!

Thank you :)

CodePudding user response:

You don't need Apps Script for this. Just use Find & Replace

  • Related