Numbers: Save file as xls using AppleScript

Hi all,
I need to remove all the external links from an Excel file. Tried to do this first using Automator and the Excel actions, but every time Excel opens one of the files it displays an error message that it's missing the external files and the Automator sequence is pauzed. Now I found out that if I open the Excel file with the Numbers app and save it again in the same file format (xls), the links are broken.
Now my question is how I can open the Excel files using Numbers and save them again as xls files. Since there are no Automator actions for Numbers, I'd like to accomplish this by using an AppleScript, which I'm very new to. Somebody help?
Thanks in advance

Some nice scripts for saving iWork files to Office formats were listed here.
I think the problem comes in with opening the Excel file with Numbers in a script. I believe this often brings up a Document Warnings window that requires user input, and I haven't seen any good way to deal with that in a script.

Similar Messages

  • Save file to database using WEBUTIL

    Hi,
    I have used webutil_file_transfer.Client_To_AS_with_progress to upload files from client to Application Server using Forms 10g
    However, now i want to save file in database and not upload to database.
    Apart from the problem, I was wondering if there is documentation available on WEBUTIL
    Please help

    I want to store the file in the database as a BLOB.
    Earlier I was uploading to Application Server.
    I had used webutil_file_transfer.Client_To_AS_with_progress to upload to Server,
    I hope there is a procedure / function similar to Client_To_AS_with_progress in the webutil_file_transfer package

  • Save File as SVG using Illustrator

    Generous Helper,
    I am trying to save the file as .SVG format using illustrator..
    Openin in notepad the saved file shows the elements and attribute like:
    <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
      width="800px" height="600px" viewBox="0 0 800 600" enable-background="new 0 0 800 600" xml:space="preserve">
    <rect x="132.286" y="53" fill="none" width="161.429" height="17.857"/>
    <text transform="matrix(1 0 0 1 132.2856 61.52)" font-family="'MyriadPro-Regular'" font-size="12">Name</text>
    <rect x="137.286" y="87.286" fill="none" width="102.143" height="10.714"/>
    </svg>
    I like to see the elements and attributes like:
    <g transform="translate(100,100)">
    <text id="TextElement" x="0" y="0" style="font-family:Verdana;font-size:24"> Name !
    <animateMotion path="M 0 0 L 100 100" dur="5s" fill="freeze"/>
    </text>
    </g>
    The difference between both the files is
    text id="TextElement" , so that I can use this as pointer for data to enter.
    can someone tell me how I can achieve the code no# while saving the file as .SVG using Illustrator.  While writing of my own .SVG file like code # 2 , I can write it and it is very well valid.
    But I want illustrator write me the same style of code. I played around various options but every time I am getting the same style of code ( Code # one) using illustrator.
    Thanks,

    Hi —
    I'm a newbie to the forum reply system, but I try to check in for good info quite often.
    If you are going to work with SVG and text input-output, you should be using the Variables palette and a schema architecture for your data. Start with reading the Help PDF "Data-driven graphics". There are a lot of considerations, up-front decisions and setup to prepare, but the pay-off is worth it. Also see the "About data sets" and "About variable libraries". Since this is an "open standard" there are element and property rules that are out on the XML site (you probably are already aware of these) and can help when swapping one element's name for another if you need to transform the output on the fly. You can actually build database exchanges without paying for a proprietary conversion application by using XML — if both databases are XML-friendly.
    I'm sure if you go out to an XML forum, there are folks out there that can help with the output; once the file is saved as an SVG with the appropriate element names and setup. A helpful hint is not to save with Illustrator editing options. It saves two files then: one in SVG and the other in Illustrator, along with other errata. You can still edit the file without that option by simply opening it in Illustrator at any time, although you will see it has been "dumbed-down" a bit. SVG is cool, but not as mature as it should be and it does odd outputs when there are a lot of layers or clipping paths. If you are using an earlier version of Illustrator, the text can be fractured into individual letters and would need to be re-entered. The KISS method is the best route, although I have seen some awesome animations using SVG. Also, there are rumblings that CS3 and 4 cannot be opened in some other applications... I'm still researching that one.
    Whenever I plan XML text interchange, I approach it as a separate project from the actual graphic like an extension that can surround it. It doesn't matter which you do first, the graphic layout and then the text interchange or visa versa... as long as you see them both as equally time-consuming for the initial set-up. Just because it is easy to type in the text and see it output, doesn't mean it will bend to your needs without a well-thought-out plan.
    Hope this is of some help.
    You may want to check out http://www.svgopen.org and http://www.svgopen.org/2009/ and the latest http://twitter.com/svgopen/ and http://www.planetsvg.com - see who might be  represented from Adobe Illustrator (or not) since they are no longer supporting SVG (this year, anyway).

  • How to save file in km using web dynpro abap

    Hi Experts,
    We have a requirement that file should be saved in a folder in km, the name of the folder should be the employee number.
    Could you please tell me how to create folder with employee number in KM and store file in it using web dynpro abap.
    Thanks and Regards,
    Santhoshi.

    Thanks Naga Raju Meesala.
    How come all these methods are deprecated...getEP5User
    Also, since I am building a weddynpro DC, what is the proper way to include these jar files as Used DCs?
    Now proceed in the same way with the variable PORTAL_HOME and add the following .jar files:
    u2022 \lib\prtapi.jar The portal runtime APIs
    u2022 \portalapps\com.sap.portal.usermanagement\lib\com.sap.security.api.ep5.jar The user management APIs of the Enterprise Portal 5.0 are deprecated, but still in use in SAP NetWeaver 04
    u2022 \portalapps\com.sap.netweaver.bc.rf\lib\bc.rf.framework_api.jar KM Repository Framework APIs
    u2022 \portalapps\com.sap.netweaver.bc.rf.service\lib\bc.rf.global.service.urlgenerator_api.jar Repository Framework Utility: URL Generator
    u2022 \portalapps\com.sap.netweaver.bc.sf\lib\bc.sf.framework_api.jar Repository Framework: Repository Services
    u2022 \portalapps\com.sap.netweaver.bc.util\lib\bc.util.public_api.jar Repository Framework Utilities

  • How do I save an excel file as XML using applescript.

    I set display alerts to false, but excel will not save.  I get error -1708.
    My code looks as such:
    set theFile to "Macintosh HD:Users:Dustin:Documents:products.xlsx"
    tell application "Microsoft Excel"
      activate
      open theFile
              set display alerts to false
              tell active sheet
      save as filename "products.xml" file format XML spreadsheet file format
              end tell
      close active workbook without saving
              set display alerts to true
    end tell
    end
    If I remove the code to set the display alerts, excel pops up an display alert to continue or cancel the save.
    I'll take anything at this point....

    Are you sure you want to do a "SAVEAS" to create the PDF?  What version of MS Office are you using?
    One of the best ways to figure out how to do something with ActiveX in Excel is to first do it in Excel by recording a Macro.  See what code Excel generates, then try to model that in LabVIEW.
    I don't see .pdf as an option you can save Excel as a filetype to (Excel 2007).  But when I go to the Excel 2007 button, Save As, then PDF or XPS while recording a macro, I get this code.
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
    "C:\Documents and Settings\CurrentUser\Desktop\FILENAME.pdf", Quality:= _
    xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
    OpenAfterPublish:=True
       This shows me you should be usingthe ExportAsFixedFormat method on the worksheet as opposed to trying to use the SaveAs method on the workbook.  (But the workbook object as that same method as well.)

  • Save File as txt using VBA

    I am looking to save a pdf file as plain text through VBA, however I am getting the error "Security Settings Prevent access to this property or method". I am using Acrobat 9.0 Standard.  Please help!
    Here is the code I am using in VBA:
    Dim AcroXApp As Object
    Dim AcroXAVDoc As Object
    Dim AcroXPDDoc As Object
    Set AcroXApp = CreateObject("AcroExch.App")
    AcroXApp.Hide
    Set AcroXAVDoc = CreateObject("AcroExch.AVDoc")
    AcroXAVDoc.Open strPDFPath, "Acrobat"
    AcroXAVDoc.BringToFront
    Set AcroXPDDoc = AcroXAVDoc.GetPDDoc
    Dim jsObj As Object
    Set jsObj = AcroXPDDoc.GetJSObject
    jsObj.SaveAs strOutputFile, "com.adobe.acrobat.plain-text"
    AcroXAVDoc.Close False
    AcroXApp.Exit

    You can try it with iText dll
    It is open source!
    This is in C# but in VB is the "same":
    public string GetPdf(string _path) {
                var sb = new StringBuilder();
                var path = _path;
                try
                    PdfReader reader = new PdfReader(path);
                    int n_pages = reader.NumberOfPages;
                    int i = 0;
                    for (i = 1; i <= 1; i++)
                        var pageBytes = reader.GetPageContent(i);
                        if (pageBytes != null)
                            var token = new PRTokeniser(pageBytes);
                            while (token.NextToken())
                                var tknType = token.TokenType;
                                var tknValue = token.StringValue;
                                if (tknType == PRTokeniser.TokType.STRING)
                                    sb.Append(token.StringValue);
                catch (Exception e)
                    return e.Message;
                return sb.ToString();
    Cheers =)

  • Change selected file in automator using applescript ???

    So I'm getting better at using Automator to create useful Services but still a bit of a newbie with doing powerful things with AppleScript... and I think this task requires some applescripting. Here's what I want to do:
    1. Based on a selected text file I want to run a pre-existing script that converts this file into an HTML file. This new file has the same name as the text file but has the .html extension rather than the .txt extension. (This step is easy enough with Automator and it works just fine already.)
    2. BUT NOW, I want to take that resulting HTML file and run another pre-existing script that converts the HTML file into an RTF file. The problem is that I basically want to change the selection from selectedfile.TXT to selectedfile.HTML so that I can proceed to this next step...
    3. AND THEN, I want to launch an app with this resulting RTF file. Again, I need to change the selection to selectedfile.RTF.
    Right now this requires me to run three different automator services, and changing the selected file between each step... But I'm sure there's an easy applescript way (or other way) to do this using just one service -- probably involves some filename parsing and some magic to change the selection??? -- or something like that...
    Could anyone point me in the right direction???
    Thank you thank you thank you!
    ~zyyyy

    Have you considered using a bash script? You can even write the script in an Automator Service.
    Open Automator and select Service from the main screen. Set the ‘Service Receives Selected’ pop-up menu to Files or Folders, and set the ‘in’ pop-up to Finder. Drag Run Shell Script from the Utilities section of the actions library into the workflow area. Set Pass Input to As Arguments. Replace the sample code in the input area with this:
    for f in "$@"
    do
    file_ext="${f##*.}"
    if [ $file_ext = "txt" -o $file_ext = "TXT" ] ; then
    /usr/bin/textutil -convert html "$f"
    /usr/bin/textutil -convert rtf "${f/$file_ext/html}"
    /usr/bin/open -a /Applications/TextEdit.app "${f/$file_ext/rtf}"
    fi
    done

  • How can I set a default save file for scans using the Solution Center?

    Using Windows 7 - 64 bit.   HP Photosmart Premuim C-309a All-In-One Printer.
    Because of a Windows crash, I had to install a new drive and reload Windows. I also reloaded other software like the HP Solution Center & Drivers. My problem is that I can't find how to set a default folder for my scans.  This is NOT mentioned in the user manual but it was originally accomplished by HP Tech Support when the printer was new.  Can anyone relate how to set default folders for my scans?
    Thanks.
    Tango
    This question was solved.
    View Solution.

    Here is a document on how to scan through Windows 7. 
    http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&lc=en&docname=c03476857
    Click either solution center or the icon of the printer on your desktop. Here select "Scanner Actions" (or the analogous selection). When the window pops up from the HP software it should provide you with options for file type (.tiff, .pdf, .jpg) as well as resolution and media size. Here on this page there is also an option for you to go to the advanced options. Using this you can alter the default safe folder. 
    Let me know if that helps you out! 

  • Can't save file already in use or open

    I've seen a lot of posts on this subject, so rather than replying to a specific one that may be on a different trail, I decided to open a new discussion. Lately I've had a lot of problems saving a file while in photoshop cs6 and getting this error. Sure, I can do a save as then delete the former file, but that doesn't solve the problem.  Since it happens so often, I want the solution.  Since the only application I have running when I get this error is Bridge, I closed Bridge when I got this error, and then I could save the file.  In some of the discussion threads on this problem, I did see some reference to previews.  I suspect this has to do with Bridge building previews or extracting previews or something related behind the scenes.  I will keep monitoring this situation to see if closing Bridge always takes care of this problem.  However, I never had this problem before, so I wonder if some of the latest updates created a new problem. I run Windows 7, and all the latest releases of ACR, PS, etc. Thoughts?

    Do you have any layered TIFF's?  It was a problem in Bridge as they keep caching.  Do not know if the bug fixed yet. 
    Workaround is to turn off TIFF in edit/camera raw in  Bridge.

  • Numbers 08 export to .xls then import to iPad Numbers?

    As the title suggests I need to know if I buy Numbers for my iPad would I be able to export my three important Numbers 08 files to .xls format and then import in iPad Numbers? As I already know that iPad Numbers will not open iWork'08 files (Numbers)
    I don't really want to buy iWorks'09 for the laptop as well as Numbers for the iPad

    The only way I've managed to export documents from my iPad is mailing it to my self, which is ok. The problem is that the numbers format is not recognized by Excel so basicly the iPad.Numbers is useless in an office environment.
    Too pity really. I

  • AppleScript open and save file with Numbers

    Hi all,
    I need to save an Excel .xls file as an .xls file in order to break the links that are included in the original Excel file. Since Numbers doesn't have any actions for Automator, I hoped someone could help me writing an AppleScript?
    It needs to open (Numbers) and all the .xls files that are added to a specific folder on my Mac, then save them to another folder as .xls (not .xlsx) and overwrite any existing files with same name. Since this all should work automatically, warnings and pop-ups that need a user to click an option are not allowed.
    Didn't think this could be too hard, but I'm just a noob when it comes to AppleScript. Help?
    Thanks in advance

    Check the attributes of the <textarea> tag. You can use wrap="no" or wrap="virtual" or wrap="hard" to define how the text area handles carriage returns.
    Brian

  • Numbers 3.0 won't save files!

    Numbers 3.0 suddenly won't save files on my Macbook Pro.
    I opened a .csv file, made some changes in Numbers, and tried to Save to my desktop.  I get a window that says "The file '[filename].numbers' couldn't be opened". 
    I tried to Export to a .xls file, and also Share>Send a Copy>Email and chose Excel as the option.  Same message about not being able to open the file.
    This makes Numbers totally unusable for me.  And for some reason, the old version of Numbers is suddly gone, so no fallback there anymore.
    Any tips?

    And for some reason, the old version of Numbers is suddly gone, so no fallback there anymore.
    Hi Oslo,
    Numbers 3 exports to Excel fine on my machine, though it uses the extension .xlsx not .xls.
    Same with Share>Send a Copy>Email. Works fine.
    So maybe you should try closing Numbers 3 and reopening it, or restarting your Mac.
    Your old version of Numbers should still be on your Mac, in a subfolder within Applications named iWork '09 or similar.
    SG

  • In Numbers, how can I save a filter sequence using Reorganize?

    I'm using Numbers (from iWorks 9) and have a filterning sequence that involves a date range and finding specific values in a text column.  It's pretty straightforward to use the Reorganize button, but my macro program (QuicKeys) can't seem to negotiate the nested pull-down menu selections, so is there a way to save this sequence within Numbers?

    File menu, Export. Select Excel as the format.

  • Having trouble using applescript to save pdf as excel spreadsheet

    I have been trying to use applescript to create an automator action to convert some downloaded PDF's to .xlsx format.  After reviewing a good bit of the SDK documentation, I came up with the following scripting:
    tell application "Adobe Acrobat Pro"
                                  open theFile
                                  save front document to file theNewFile using conversion "com.adobe.acrobat.xlsx"
      close front document
    end tell
    This script works fine when I use the "com.adobe.acrobat.plain-text" conversion or the png or jpeg conversion. However, I cannot get it to work with "com.adobe.acrobat.xlsx" or "com.adobe.acrobat.spreadsheet".  Note that although I didn't copy the code here that sets theNewFile variable, I have been changing it to the appropriate file extension when changing conversion strings.
    When I execute the script using one of the problem conversion strings, Acrobat opens the file successfully, but it just sits there, as if it does not understand the save command at all.
    I guess I should mention that the whole goal here is to actually convert the PDF's to CSV eventually.  The next step was going to be to open the file in Excel and save as CSV.  If anyone knows a *free* way to go straight from PDF to CSV using Applescript/Automator without having to go through all these other programs, I would be very appreciative for the suggestion.  This conversion is just a small part of a very lengthy workflow but it is causing me the most trouble.

    Hello Jonathan,
    Ok i have only one final question.
    Do you know how to work in photoshop, don't you? Ok i think yes.
    Well i have 2 ways to do that, i did one action from photoshop that will get the image inside folder and will convert this image in pdf. Abouve the line of script
    that you have to attach to folder action and the action for Photoshop.
    About the action for Photoshop give me your email address and I send you, or do it your self. You have to do this: open one image in JPG, go to action, go new set, put your name of set, put the name of action if you like you can change the name, go print with preview, print and set save as PDF close your file and stop the action.
    Now that you have to do is put all your files inside your folder and leave the Photoshop do it for you, ok?
    Good Luck
    Hack
    property speak_alert : false -- if true, the script will speak the alert. If false, the script will display an alert dialog
    property dialog_timeout : 30 -- set the amount of time before dialogs auto-answer.
    property copychecksindicator : false
    property itemcheck_delaytime : 2
    property foldercheck_delaytime : 3
    property speciallabelindex : 7
    on adding folder items to this_folder after receiving added_items
    if copychecksindicator is true then
    set the added_items to my checkaddeditems(the added_items)
    if the added_items is {} then return "no vaild items"
    end if
    tell application "Finder"
    activate
    set this_folder to choose folder with prompt "pdf"
    set these_files to every file of folder this_folder
    end tell
    tell application "Finder"
    repeat with i from 1 to number of items in these_files
    set this_path to (item i of these_files) as string
    tell application "Adobe Photoshop CS2"
    launch
    open file (this_path as string)
    set this_files to current document
    do action "Jpg" from "Jpg para Pdf"
    end tell
    end repeat
    end tell
    end adding folder items to

  • How to append paragraph in text file of TextEdit application using applescript

    how to append paragraph in text file of TextEdit application using applescript and how do i save as different location.

    christian erlinger wrote:
    When you want to print out an escape character in java (java is doing the work in client_text_io ), you'd need to escape it.
    client_text_io.put_line(out_file, replace('your_path', '\','\\'));cheersI tried replacing \ with double slash but it just printed double slash in the bat file. again the path was broken into two lines.
    file output
    chdir C:\\DOCUME~1\
    195969\\LOCALS~1\\Temp\
    Edited by: rivas on Mar 21, 2011 6:03 AM

Maybe you are looking for

  • How do I connect my defunct MacBook Pro (monitor's dead, HD works fine) to another computer to transfer files?

    I have an old MacBook Pro whose monitor recently died. I took it to the genius bar to get assessed and ended up buying a MacBook Air to replace it. The genius hooked up my external hard drive to the MacBook Pro and did something with the way she star

  • Creation of New Terms of Payment

    Hi, I am facing a daunting task of creating a Term of Payment for vendor with the below conditions. The details are as below: 1) 10% of the contract price as interest free mobilization advance 2) 85% against Monthly Running Account (RA) Bills within

  • Is ATI Radeon HD 4870 compatible with Final Cut Pro X?

    I heard that some Ati Radeon  aren't compatible with FCP X. Is my ATI Radeon HD 4870 compatible? Thank you

  • Word 2004 docs keep crashing when opening

    I use Remote Desktop to connect to my office computer and transfer documents over. The documents are long (50-200 pages) with jpegs and tables and charts and created on a PC. When I try to open them on my Mac (both iMac and Macbook) they crash within

  • Source codes

    Can you please let us know how we can start archiving or reusing "old" source codes? We're afraid that we may run out of available source codes soon, especially for the larger centers that offer more programs and have been live on Oracle longer than