Copy a table in Safari and paste special, as text, to an Excel worksheet

I am attempting to write Applescript code to copy a table in Safari and paste special, as text, to an Excel worksheet.
When I perform the operation manually, all the rows of the Safari table are pasted into Excel in a single column, i.e. after all of the data in a row of a table is pasted vertically into Excel,the next row is pasted in the next open cell below in the same column, as I need it.
When I use the applescript line..."paste special on worksheet format text" Excel pastes the table data in rows AND columns , like the table looks in Safari, but I do not want it pasted this way.
Any ideas on how to get my Applescript code to perform the same manual operation?
Thanks!

I do not know what Excel you have, but to copy a table from a Safari's page, you could use the table tags of the page's source to get the table you want.
That is, use text item delimiters.
deivy

Similar Messages

  • Most compatable file type to use when copying and pasting specially formatted text into html pages?

    Hello,
      I have a simple web site at http://www.psychicmeatloaf.com which is an online poetry journal site. I use files people send me (mostly .doc or .docx) and cut and paste the text from those files into html pages in an older version of Dreamweaver and some of the text has special formatting (like this page: http://www.psychicmeatloaf.com/Chang-poetry.htm ). The best way I have found to maintain the special text formatting is to open the .docx files and "save as a web page" in Word and then open the web page from Dreamweaver and then "Preview the page" in Explorer and copy and paste from the preview into an html page in Dreamveaver. Even using this method, some text will not maintain it's special formatting and for those I just save the page as a .jpg file and use that, because I have no other choice.
      My question is, is there a better way and is there a better file type to work from other than .docx?
    Thanks a milliom,
    George

    neophyte weaver wrote:
    The best way I have found to maintain the special text formatting is to open the .docx files and "save as a web page" in Word and then open the web page from Dreamweaver and then "Preview the page" in Explorer and copy and paste from the preview into an html page in Dreamveaver.
    That's a lot of steps to get to a single end that could be done with a simple copy & paste of the text into code. Like Photoshop and Fireworks, Word writes some very bulky and dirty code. I wouldn't recommend it for direct copy by the method described above.
    I personally copy the text and paste it into code view. It takes a little more work, but I don't get dozens of lines of inline styles added with it and using a preformatted post div (saved and hidden in the code (<!--post block code goes inside-->), I can quickly put title, date, byline and links up with a cut & paste.
    That's just my $0.02 worth
    Also, since nearly EVERYONE will use a different formatting in a Word doc, putting a bunch of differently formatted posts into a page will make it look like one of those ransom notes made of cut out text from different newspapers and magazines.  Better to keep everything in a single format (your format) so it doesn't become an eyesore.
    Message was edited by: Curtis_E_Flush

  • How do I keep format when copying a table to keynote? paste and match style does not keep format

    how do I keep format when copying a table to keynote? paste and match style does not keep format

    It used to work until recent updates and it is very frustrating.....I hope someone out there knows how to deal with this.

  • After updating numbers and pages I can no longer copy multiple cells from numbers and paste and match style to pages.

    After updating numbers and pages I can no longer copy multiple cells from numbers and paste and match style to pages.  I used to be able to select multipule cells in a row (such as company name, address, etc.) then paste and match style on to a pages letter. I found the paste and match style option in the edit menu, however it will only work one cell at a time. Before the update is was working great.

    For diagnosing purpose thy the procedure in a new user account and see if it works there. You create a new user account in the System Preferences > Accounts. If it works in the new account it is probably a corrupt plist file that needs to be deleted.

  • How do I copy a photo from iPhoto and paste it into a text/Pages document?

    How do I copy a photo from iPhoto and paste it into a text/Pages document (using iMaC)?

    Use the Media browser in Pages and just drag the image over.

  • Why copying from particular pdf files and pasting to Words introduces improper fonts?

    Why copying from particular pdf files and pasting to Words introduces improper fonts?
    I’m wondering copying from particular pdf files and pasting to Words introduces improper fonts! Is there some workaround to avoid this problem?
    Thank you for the help
    Best
    Jamal

    Thank you for the answer.
    if i save it as Word, then the all goes fine.
    my issue here, is why in particular cases copying and pasting from the pdf file to Word is working very well, but in others, it is not!
    what might be the reason?
    best
    Jamal

  • Copy from safari and paste somewhere words is hard to use

    I want ot copy a art clip from safari and then paste it somewhere  I have word but it is very hard to use   I have numbers and the art clip can not be sized
    so where can I paste the art clip and be able to put in text and size, color, text, etc  then print

    Insert a Shape into Numbers first (from the drop down Shapes menu in the top of Numbers).
    Then drag the image from Safari into the Shape you have created (not into a cell in Numbers).
    You can then resize the shape and if you click on the shape you can adjust the mask which will control how much of the image you can see.

  • Is it possible to copy and paste special add multimedia object to pdf?

    I am trying to add multiple audio files to a pdf.  Is there a way I can automate adding the interactive object into the same place on multiple mages with the same image poster, with same advanced settings. I am happy to select the audio file itself manually.  Really need to copy and paste in place the multimedia object on multiple pages.

    No.
    RMAs can be copied and pasted, but you cannot change the media file and cannot store the settings from one RMA as some form of 'preset' for others to use.

  • How do I copy and paste only the text from a cell?

    Hi -
    Every time I want to move text to a different cell, copy and paste copies all styles as well.  How do I just copy and paste the text while leaving the style of the receiving cell in tact?
    Thanks.
    Chris

    Christopher.  If the alternating row color is the obstacle, I suggest selecting the table, then setting the background color to white, then check the "Alternating Row Color" check box in the Table Formatter:
    Now sorting will not affect row color

  • How to copy and  paste the data directly from the excel to the PDF?

    hi,
    I have found the same question on the link:
    How to copy excel sheet to pdf form?
    But I didnt get my answer through that forum.
    My requirement is dat I should copy the data from excel sheet and directly paste it to PDF form.
    When I am trying to copy and paste ..all the data is getting pasted into a single block only.
    Kindly help.
    Thanks & Regards,
    Lina

    So you want the user/person to do the "cut&paste" action (ie. ctrlc ctrlv) and have the data paste itself across rows correctly much like Excel does. I don't think this "intelligence" is built into Adobe table controls as it is in Excel (and Excel is smart enough to even handle it different ways depending on how the user selects cells).
    The only thing I can think of is that you could "capture" the user trying to paste into a cell/row in your table (maybe in the onFocus or onClick events), then grab the data, parse it out (but looking for some character) and then have your code distribute the data across the rows. However, I personally think that would be a lot of overkill and prone to other issues and errors.

  • Copy and paste ignores track text edit preview settings?

    Hi all,
    Working with FM9 and another editor that requires me to copy and paste from FM9 into the other.
    Enable and use tracking text edits in FM9.
    Preview Final to hide the edits.
    Copy and paste a paragraph that contains edits.
    When I paste into the target text editor, the "deleted" text is also displayed.
    Any way to prevent text hidden with a condition tag (which is how the tracking changes are marked) from being copied?
    -g

    I'm pretty sure the answer is no, not in FM itself. The only way would be to create a finalized FM doc with the changes accepted prior to copy / paste.
    It would be possible with a Framescript, though -- something like this:  the user copies the text,  hits a specified function key, the script pastes the text onto a special reference page, deletes the "deleted" text, recopies the text and then it beeps so that the user can then paste into the target editor.
    More info about Framescript at http://www.framescript.com and on the user group at
        http://groups.yahoo.com/group/framescript-users/

  • Copy and paste user formatted text from Filemaker to...

    I need to copy user formatted text from Filemaker to any text program that will maintain the formatting. Subsequently it will be going to an rtf. I have limited knowledge of Filemaker and Applescript (and I am not sure that Applescript is the right approach). This is a repetitive process with frequently changing data and users who use italics on a word one day and then decide to bold it the next day. I have created an Applescript that copies and pastes the text into either TextEdit or Microsoft Word but the user formatting is always lost. It is frustrating that I can use Apple-C and Apple-V and the formatting is maintained. But I need to automate this process. Here is a copy of my humble attempt at an Applescript to do the job. it copies the text but not the formatting.
    tell application "FileMaker Developer"
    open "MacintoshHD:Users:stuart:Desktop:Practice.fp7"
    set the clipboard to record 2 of table 1 of database 1 as styled text
    end tell
    tell application "TextEdit"
    activate
    set the text of document 1 to (get the clipboard as text) as string
    end tell
    tell application "Microsoft Word"
    activate
    set myRange to create range active document start 0 end 0
    insert text (get the clipboard) at myRange
    end tell

    I'm not familiar with 'styled text'- which does not mean much other than it's on a very long list of things I don't know. But I do know you can cut several steps out here:
    If your script works so far then you can clean it up:
    tell application "FileMaker Developer"
    open "MacintoshHD:Users:stuart:Desktop:Practice.fp7"
    set mytext to record 2 of table 1 of database 1 as styled text
    end tell
    tell application "Microsoft Word"
    activate
    set myRange to create range active document start 0 end 0
    insert text (mytext) at myRange
    end tell
    Also try:
    set mytext to contents of record 2 of table 1 of database 1 as styled text
    Reese

  • How do I copy a color from Kuler and paste it to a word document?

    How do I copy a color theme from Kuler and paste it to a word document?

    Unless there is something unusual about the table, it should copy in by selecting in Pages, selecting Copy, moving to Keynote, tapping, seelcing paste.
    If the table structure is copying in, but you can't see the text (is that what is happening?), you might try selecting ghe table and changing the text color using the formatting tool.

  • How can you copy a table from Safari to Numbers

    I am in the process of migrating from open office to Numbers, since Numbers really does look a lot nicer… however there is one point that I cannot find how to do in Numbers.
    If I select a table in Safari, then in Open Office I can paste that table, and it will go into the rows/columns as a table. How can I do something similar in Numbers?

    Welcome to the Apple forums
    Safari & Numbers have improved in recognizing a table on a web page & pasting it as expected.
    Often what looks like a table on a web page really isn't & the blame should be on the web page author not Safari or Numbers. I had this problem for a few years with my online Discover Card statements. Using Firefox or Camino made no difference. When I complained to them their response was "tough, live with it" although maybe not in those exact words. I would paste the data into a Pages document & use a lot of find & replace to get the data formatted to use in a Numbers spreadsheet.
    But… it could be that the problem you're having is that you have the cursor active in the cell when you paste. If the cursor is active Numbers "thinks" you want to paste everything into that cell. Click outside the table then click once on the starting cell, making sure that the cell is outlined but you don't see the cursor & then paste. This is a much more common cause than above.

  • How do you copy images from the internet and paste them on Microsoft Word

    I'm trying to copy images from the internet and trying to paste them on to Microsoft Word and Powerpoint for an assignment but it's not working. I tried to use copy and paste and then paste special but nothing is working. Saving the image onto documents and trying to open them on Microsoft Word still doesn't work.
    PLEASE HELP!!!
    Thank you

    Hi Lily, and welcome to Apple Discussions.
    A screenshot can capture almost anything you're viewing. Hold the command and shift keys down, then press the 4 key and release all keys. Hold down the mouse button and drag the cursor to the size/area of the image you want to capture. Release the mouse button and you've captured the image. Remember that it is the individual's responsibility to respect copyright laws.

Maybe you are looking for

  • Mail app v5.3 crashes consistently

    My Mail app v5.3 doesnt open anymore. It crashed for the first time as I was writing an email. Since then, when I click on the Mail icon, it asks whether I wish to reopen the closed window, and regardless of what I select (yes or no) it crashes. I ha

  • Shipping tab is getting poplated in the Purchase order (STO Process)

    HI Friends, In Stock transfer order processs the shipping tab is getting poplated in the purchase order I am using the docuemnt type UB Stock transfer order . Error message: Not possible to determine shipping data for material "460000295" Thanks, Pha

  • MAP for Finished and Semi Finished goods

    Dear Friends, Please let me know; 1. If Finished and Semi finsihed goods are maintained with price indicator 'S' and all are inhouse production then SAP updata moving average price or these material or not ? 2. If SAP updata MAP for finished and semi

  • Distribution Model (ALE) - Message type has to be deleted from model view

    Hello, I want to delete a message type from an existing model view in the distribution model (of the maintenance system). But when I mark the concerning message type and press Edit->Delete the message 'Action cannot be carried out on the nodes select

  • Can I make the check_box bigger?

    The check_box looks like too small comparing to other objects in the form? Can I make it bigger? I tried to change fond and size, it didn't work. Thanks.