Script for MS Excel?

Does anyone know how I can make a script replace an entire batch of hyperlinks in MS Excel? Using the "Replace" command doesn't find them (although it would if I could figure out how to have my hyperlinks in a formula in the cell itself). I need hyperlinks that simply open different MS Word documents.
Therefore, I can't edit a whole group. I want something to remove the text "Drill\Drill\" and replace it with "Drill\" within the hyperlink to another document. I've got hundreds to change and I KNOW there must be a better way!
Thanks,
Lawrence

My previous reply probably didn't help much.
I did some more looking at this problem and tried out a few things before even getting to AppleScript.
1) A URL placed directly in an Excel cell will be automatically recognized and the Replace command will find the text within that URL. However this does not work for local files.
2) If you look in the help files for "Hyperlink". This command can use another cell as the source of the link_location (even using the name of a source cell works) and the Replace Command will find text located in the source cell. If you don't want to confuse your users you could format the source cells as hidden or put them on another worksheet within the same workbook that you hide. There are a number of examples at the bottom of the help files to help you format the function properly to create different types of links.

Similar Messages

  • I need a "hide" script for Microsoft Excel

    Hi. I just "upgraded" everything, new Intel based Macbook Pro, and Office 2008 for Macs. Why did I upgrade? Good question! Anyways, when I used Office 2004 for macs, I used a macro to hide several rows so that I could view information in a condensed format. then, I would unhide, and have the entire spreadsheet once again.
    I am new to applescript, and have been trying to absorb as much as I can. So far, I wrote a script that can select and range, and fill in a color.
    Anyways, I need a script that can hide several rows (ranges?) in a spreadsheet, and then a script to unhide them again.
    Thanks!
    Timo

    Hello
    Perhaps something like this.
    It is based upon 'Excel 2004 AppleScript Reference' that you can obtain from the link below but NOT tested, for I don't have this application. Also Excel 2008 may vary.
    (* hide rows 1 through 5, 20 through 25 and 30 through 40 *)
    tell application "Excel"
    tell active sheet
    set hidden of range "1:5,20:25,30:40" to true -- hide
    end tell
    end tell
    (* un-hide rows 1 through 5, 20 through 25 and 30 through 40 *)
    tell application "Excel"
    tell active sheet
    set hidden of range "1:5,20:25,30:40" to false -- un-hide
    end tell
    end tell
    cf.
    http://www.microsoft.com/mac/developers/default.mspx
    Excel2004AppleScriptRef.pdf
    Table Suite > Table Suite Classes > Class: range (> properties > hidden)
    p.331
    Using the Excel Dictionary > How to reference cells and ranges
    pp.15-18
    Good luck,
    H

  • Indesign Script for placing excel-file

    Hi all, I'm new to Indesign Scripting, and I'm hoping someone can help me with the following code:
    All I want to do is:
    open indesign file
    open excel file
    place excelfile as a table (with flow enabled)
    save document & export as PDF
    Thanks!
    //Define file to open
    var myDocumentFile = new File("/d/Projecten/Indesign Server/document.indd");
    //Define file to save
    //var mySaveFile = new File("/d/Projecten/Indesign Server/document_save.indd");
    //Define file to export
    var exportPDF = new File("/d/Projecten/Indesign Server/document_save.pdf");
    //Open xls-file to place as table
    var myExcelFile = new File ("/d/Projecten/Indesign Server/products.xls");
    var result = "";
    if(!myDocumentFile.exists) {
        result = "Unable to find DOCUMENT:  " + myDocumentFile.path;
        $.writeln(result);
        exit();
    } else if(!myExcelFile.exists) {
        result = "Unable to find EXCEL:  " + myDocumentFile.path;
        $.writeln(result);
        exit();
    } else {
        // Open file
        var myDocument = app.open(myDocumentFile);
        with(app.documents.item(0).pages.item(0)){
            myTarget = textFrames.item("tabel");
        var myPage = myDocument.pages.item(0);
        //Set excel placement properties
        setXLimportPrefs();
        // Place Excel file
           try {
                 $.writeln("Place Excel file");
                //HELP!! HOW TO PLACE EXCEL FILE?
                //myTextFrame.place(myFile);
            catch (e) {
                 $.writeln("Place Excel file "  + e + " " + app.excelImportPreferences.errorCode);
                myDocument.close();
                exit();
        if(!exportPDF.parent.exists && !exportPDF.parent.create()) {
            result = "Not exported.  Unable to create the folder:  " + exportPDF.parent.fullName;
            $.writeln(result);
        } else {
            app.documents.item(0).exportFile(ExportFormat.pdfType, exportPDF, app.pdfExportPresets.item("[Press Quality]"));
        myDocument.exportFile(ExportFormat.PDF_TYPE,exportPDF);
        myDocument.close();
    function setXLimportPrefs(){    $.writeln("setXLimportPrefs()");
            with(app.excelImportPreferences){
                //alignmentStyle property can be:
                //AlignmentStyleOptions.centerAlign
                //AlignmentStyleOptions.leftAlign
                //AlignmentStyleOptions.rightAlign
                //AlignmentStyleOptions.spreadsheet
                alignmentStyle = AlignmentStyleOptions.spreadsheet;
                decimalPlaces = 4;
                preserveGraphics = true;
                //Enter the range you want to import as "start cell:end cell".
                rangeName = "A1:B16";
                sheetIndex = 1;
                sheetName = "Appetizers";
                showHiddenCells = false;
                //tableFormatting property can be:
                //TableFormattingOptions.excelFormattedTable
                //TableFormattingOptions.excelUnformattedTabbedText
                //TableFormattingOptions.excelUnformattedTable
                tableFormatting = TableFormattingOptions.excelFormattedTable;
                useTypographersQuotes = true;
                viewName = "";
    result;

    "I just loaded a table into a text frame but it still contains nothing". I wonder how I'd check that, actually.
    @Jongware:
    To prevent this situation you could set the max. allowed cell height below your min. text frame height.
    If this is not applicable, because in some situations you cannot know the usable text frame height beforehand, you can iterate through all your set rows and check if the parentTextFrames[0].parentPage.name property of the first insertionPoint of its first cell is defined. If it's undefined and your last text frames parentPage.name is not equal to the last defined parentPage.name of your check your table will remain overset.
    Thinking about that method I must admit, that you can get a false positive, if a text wrap object on an applied master page comes into play…
    So no, I see no fail-safe check for this situation.
    Uwe

  • Java script for Artwork

    Hi,
    Can anybody have the script code for checking the stroke, overprint, color for the completed artwork.I am in need of a script which should check the stroke weight, color of the objects, overprint. I just want to run this script after completing my artwork. I need this script to maintain consistency for my artworks. [Generally i use stroke weight of 0.5pt, Grayscale arts (sometimes color arts) ]. Can anybody suggest/have the script for this ?
    Thanks in advance,
    Bal

    Here is an example, which creates a list item and sets its column values:
    var siteUrl = '/sites/MySiteCollection';
    function createListItem() {
    var clientContext = new SP.ClientContext(siteUrl);
    var oList = clientContext.get_web().get_lists().getByTitle('Announcements');
    var itemCreateInfo = new SP.ListItemCreationInformation();
    this.oListItem = oList.addItem(itemCreateInfo);
    oListItem.set_item('Title', 'My New Item!');
    oListItem.set_item('Body', 'Hello World!');
    oListItem.update();
    clientContext.load(oListItem);
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
    function onQuerySucceeded() {
    alert('Item created: ' + oListItem.get_id());
    function onQueryFailed(sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    Source: https://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

  • Script to get excel to open the last (latest) downloaded file

    Here is the plan. I have a script to have safari go download a file. Then I need script to have excel open the latest downloaded file from that folder. There will be other files in the folder and I cant do it by name.
    Any help would be much appriciated.

    Hi Damo1155,  
    Thanks for your post.
    Do you mean that you want backup your VSO source files to a local machine folder using script(execute tf get command line)? if yes, we suggest you backup all your VSO source files in a specified local workspace folder on your client machine. Please try below
    example steps:
    On your client, connect to your VSO using VS, then mapping your VSO DefaultCollection(the root node) to D:\VSO folder in Source Control Explorer.
    Open Command Prompt, and execute this command ‘D:\VSO>tf get /version:T /recursive’ to get latest source in D:\VSO folder.
    After executed that command successfully, you will find all your VSO source files be got in that D:\VSO folder on your client. Then you can create a script file to run this D:\VSO>tf get /version:T /recursive command on your client periodically, it will
    backup all your VSO latest source to this D:\VSO folder on your client.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • NO Script for Register RG1

    Dear Frineds
    when I try to print the register then it is showing error no script for RG1 register
    what should I do
    Regards
    Arun

    Hi Arun,
    Which version of SAP you are using? SAP has provided Excel formats In ECC 5 and ECC 6 Versions to be downloaded for all these registers.
    If you are in 4.6X versions, please check in in the table J_2ILAYCTR, whether layout exists or not.
    Regards,
    Sai

  • Creating SQL-Loader script for more than one table at a time

    Hi,
    I am using OMWB 2.0.2.0.0 with Oracle 8.1.7 and Sybase 11.9.
    It looks like I can create SQL-Loader scripts for all the tables
    or for one table at a time. If I want to create SQL-Loader
    scripts for 5-6 tables, I have to either create script for all
    the tables and then delete the unwanted tables or create the
    scripts for one table at a time and then merge them.
    Is there a simple way to create migration scripts for more than
    one but not all tables at a time?
    Thanks,
    Prashant Rane

    No there is no multi-select for creating SQL-Loader scripts.
    You can either create them separately or create them all and
    then discard the one you do not need.

  • Error while executing script for sharepoint online (office 365) - the remote server returned an error: (503) server unavailable

    error while executing script for sharepoint online (office 365) - the remote server returned an error: (503) server unavailable.
    I am creating many site collections reading records from sharepoint list using powershell in sharepoint online tenant (office 365).
    Few site collections are created and then getting above error so this error record will be skipped then few succeeding record processed then again getting error.
    pattern is like:
    success
    success
    success
    success
    Error
    success
    success
    success
    success
    success
    success
    error
    success

    Hi,
    As it is an online environment, to troubleshoot this issue in an easier way, I suggest you contact Office 365 Support to see if there is any useful information in
    the log files in the server side:
    https://support.office.com/en-us/article/Contact-Office-365-for-business-support-32a17ca7-6fa0-4870-8a8d-e25ba4ccfd4b?ui=en-US&rs=en-US&ad=US
    Best regards
    Patrick Liang
    TechNet Community Support

  • Custom calculation script for checkboxs

    Hello,
    Can anyone help me out with custom calculation script for this?  I have two mutually exclusive checkboxes that, when checked, I want to populate data into other text fields.
    If Checkbox1 is checked:
    Company1=Warehouse Alpha
    Address1=1234 Any Street
    City/State/Zip1= Los Angeles, CA 90020
    Contact Name1= Mr. Nice Guy
    Phone Number1= 213-854-8565
    Email1=[email protected]
    If Checkbox2 is checked:
    Company2=Warehouse Beta
    Address2= 5678 Awesome Blvd.
    City/State/Zip2= San Bernardino, CA 96545
    Contact Name2= Mr. Handsome
    Phone Number2= 909-824-8265
    Email2=[email protected]
    Thanks,
    Bryan

    So one has two check boxes and one wants them to be mutually exclusive. Name them the same and change the export value of the field. Try it and observe what happens as you check the different check boxes.
    You have described what happens if either box is checked but what happens when a checked box Is unckecked?
    One can place scripts in many locations. I would use a mouse up action for both the check boxes, use the same script for both check boxes.
    I would assume you are using the following names for the fields to populate:
    Company
    Address
    CityStateZip
    ContactName
    PhoneNumber
    Email
    // Mouse up action for both check boxes;
    // initial value for the fields:
    this.getField("Company"),value = "";
    this.getField("CityStateZip"),value = "";
    this.getField("ContactName"),value = "";
    this.getField("PhoneNumber"),value = "";
    this.getField("Email"),value = "";
    // test for check box value for selected box;
    if(event.value == 1) {
    this.getField("Company"),value = "Warehouse Alpha";
    this.getField("CityStateZip"),value = "1234 Any Street";
    this.getField("ContactName"),value = "Los Angeles, CA 90020";
    this.getField("PhoneNumber"),value = "213-854-8565";
    this.getField("Email"),value = "[email protected]";
    if(event.value == 2) {
    this.getField("Company"),value = "Warehouse Beta";
    this.getField("CityStateZip"),value = "5678 Awesome Blvd.";
    this.getField("ContactName"),value = "San Bernardino, CA 96545";
    this.getField("PhoneNumber"),value = "Mr. Handsome";
    this.getField("Email"),value = "[email protected]";
    // end Mouse up action for both check boxes;

  • Sharepoint warmup script for https sites

    we want to warm up https site which is based on sharepoint 2010.
    When we run some sample powershells it shows access forbidden error so we are not able to warm up https site.
    Its slow on first load so need some warmup script for https sites.
    sharepointer

    Just ensure that the service account that you use to trigger the Powershell scripts has access to IIS and SharePoint.  Most often, the SharePoint Farm account would be used for scheduling the warm up scripts on the WFE server.
    I trust that answers your question...
    Thanks
    C
    http://www.cjvandyk.com/blog

  • WSUS script for pending reboot possible addition - How

    Hi, I am found script for pending reboot and script work perfectly. My problem is that script generate only pending computers reboot for master wsus server not for replica servers. Can I modify this script to generate pending reboot for all replica servers on
    one place(wsus master server) or I must run this script on every replica server. This is script:
    [reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null
    if (!$wsus) {
    $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer();
    $computerScope = new-object Microsoft.UpdateServices.Administration.ComputerTargetScope;
    $computerScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
    $updateScope = new-object Microsoft.UpdateServices.Administration.UpdateScope;
    $updateScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
    $computers = $wsus.GetComputerTargets($computerScope);
    $report = @()
    $computers | foreach-object {
    $computer = $_.FullDomainName
    $updatesForReboot = $_.GetUpdateInstallationInfoPerUpdate($updateScope)
    $updatesForReboot | foreach-object {
    $temp = "" | Select Computer,Update
    $temp.Computer = $computer
    $temp.Update = ($wsus.GetUpdate($_.UpdateId)).Title
    $report += $temp
    $report | Select "Computer","Update" | Export-Csv -Path c:\..PendingReboot.csv -Delimiter 1 -NoTypeInformation

    Modified script
    work great. I have report from all replica server and master server after new updates
    from today. I am add mail option and finaly this is what I am modify:
    [reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null
    if (!$wsus) {
    $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer();
    $computerScope = new-object Microsoft.UpdateServices.Administration.computerTargetScope;
    $computerScope.IncludeDownstreamComputerTargets = $true
    $computerScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
    $updateScope = new-object Microsoft.UpdateServices.Administration.UpdateScope;
    $updateScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
    $computers = $wsus.GetComputerTargets($computerScope);
    $report = @()
    $computers | foreach-object {
    $computer = $_.FullDomainName
    $updatesForReboot = $_.GetUpdateInstallationInfoPerUpdate($updateScope)
    $updatesForReboot | foreach-object {
    $temp = "" | Select Computer,Update
    $temp.Computer = $computer
    $temp.Update = ($wsus.GetUpdate($_.UpdateId)).Title
    $report += $temp
    $report | Select "Computer","Update" | Export-Csv -Path c:\yourpath...PendingReboot.csv -Delimiter 1 -NoTypeInformation
    $smtpServer = "your mail server"
    $att = "c:\yourpath...PendingReboot.csv"
    $msg = new-object Net.Mail.MailMessage
    $smtp = new-object Net.Mail.SmtpClient($smtpServer)
    $msg.From = "[email protected]"
    $msg.To.Add("[email protected]")
    $msg.Subject = "Pending Reboot"
    $msg.Body = "Your msg"
    $msg.Attachments.Add($att)
    $smtp.Send($msg)

  • BO Live Issue for MS Excel 2003

    I am  getting the following error while using the BO Live for MS Office 2003.
    Live Office version u2013 12.1.3.1028
    An error occured while opening the report. The report does not exist;you have insufficient rights to open the report or you cannot make a conneciton to the BusinessObjects Web Serive (LO 02010)
    I have access to the BOXI enviornment, reports and universes.
    Still getting this issue. Works fine on MS Office 2007
    Any idea why this may be occuring? Anything that I need to check?

    Hey Ram,
    You will need to create a new DSN for the Excel 2007 files when using them as the datasource. You need to go into your ODBC administrator and add a new entry for the new format of Excel files. When you click on Add, there should be an entry for Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb) . You may also need to delete your old Excel entry first.
    Regards,
    -Amith.

  • Open data set for reading excel file on application server in back ground

    open data set for reading excel file on application server in back ground

    hi Vijay,
    I am afraid you won't be able to read from Excel file on Appl. Server.
    ec

  • Running Permission Scripts for App-V packages in VDI environment

    Hi
    We use App-V 5.0 SP1 in VDI environment.
    We have a major problem with packages' permissions
    Our users don't have administrative privileges on their machines.
    As the option for "Security Descriptors" is discontinued, the only way to give permissions to a folder in a package is to use the VFSCACLS.vbs as a startup script of a package.
    This way the first time users launch an application they're prompt to reopen it, and the second time they can use the application with the needed permissions.
    The problem:
    The script saves those permission changes under LOCALAPPDATA\AppV...
    Therefore, everytime the users logoff the folder is deleted (VDI...) and again, they must run the script for the first  again to get the permissions back after logon!
    We cannot roam the LOCALAPPDATA\AppV folder as its size can be dozens of GBs...
    Folder permissions with group policy is also not a solution, as the folder name changes everytime we upgrade a package and it's impossible to follow with hundreds of packages.
    So it's either we're missing something critical in the architecture with VDI environment or there's a normal solution for these situations.
    Would love to get some help
    Thanks
    Tamir Levy

    Hi Nicke
    that's what I did! the problem is that I find my self over and over again want to sequence packages in App-V 5.0 and forced to sequence it in App-V 4.6.
    I really hope that it wasn't App-V team's goal. announcing App-V 5.0 and tell us it doesn't support many things so we will still need App-V 4.6 forever.
    I have to maintain 2 different App-V environments with 4 different servers , 4 different sequencers and 2 clients on each computer. it doesn't make any sense for me to forced to stay with both of the versions forever.
    correct me if I'm wrong but App-V 4.6 is a legacy application. the new versions cover only support on newer operating systems and nothing more. I won't be surprised if in the next version of MDOP won't come with App-V 4.6 anymore and Microsoft will announced
    it's unsupported very soon.
    Every time I open a ticket with MS Support the best thing I get is "It's a known issue, we can't tell when it will be fixed"
    can you help me more ? move it forward to other people from the inside? at least agree with me that something is not as expected in App-V 5.0... :(
    I love the technology, I believe in it, I'm kinda depend on it and I only want it to be better
    Tamir Levy

  • One script for multiple loaded movie clips

    Hello,
    I am sure that this has been asked or answered before, but
    could not locate the correct response.
    Problem:
    There are 20 movie clips loaded onto the stage through
    actionscript. I have 20 different onPress scripts to start the drag
    for each (which also contain custom variable).
    Problem, I have one single onRelease script which is to be
    used for each, but do now wish to give 20 custom handled scripts.
    Can I somehow use certain scripting for using one single
    generic script for the onRelease? So no matter what was released it
    will go through this one script.
    Thanks
    D

    like this...
    activate
    set the_folder to choose folder with prompt "Select the folder you want to add folders to..."
    tell application "Finder"
    set the_name to "Name"
    set the_count to 3
    repeat with this_num from 1 to the_count
    set new_num to this_num as string
    if (count new_num) is 1 then set new_num to "0" & new_num
    make new folder at the_folder with properties {name:the_name & " " & new_num}
    end repeat
    end tell

Maybe you are looking for

  • Change report database

    I guys: i have a problem when I am trying to change the report database. the report is currently using a oracle sql to fetch data into the report. when i try to move it to another database (test envirment) tables' schema name is changed so i basicly

  • An sample progam how to reterieve values from logical database

    i need to reterieve prart, vernr, verna, from the table prps using the logical database psj, i know if i give psj in the logical database of the report attributes, but i should not give in the attributes, but i need to use the logical database. i nee

  • Obtain Job invoker for a SSIS job scheduled in SQL Server Agent

    Hello, I was required to tell the job runner of a particular SSIS job scheduled in SQL Server Agent (in SQL Server Management Studio 2008 R2). I noticed that after running the job, a record can be found in msdb.dbo.sysjobhistory in the [message] colu

  • Copy All Employee Master Data

    Dear All, In Human Recource module I have a list of Employees, Now I create new database and want to copy all Employee Master data from old database to new database . Please give me the solution for this problem. Thanks & Regards

  • How to specify dateField in DataGridColumn by use it's attribute

    How to specify dateField in DataGridColumn by use it's attribute ( For example use attribute "name" and "table" to specity each dataField) Thanks any idea. <mx:HTTPService id="myEmployee" url=" http://localhost/test/myEmployee.xml" useProxy="false" m