• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Data from html table to excel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Data from html table to excel


  • Subject: Re: Data from html table to excel
  • From: Yvan KOENIG <email@hidden>
  • Date: Tue, 22 Aug 2006 11:37:35 +0200

Hello

Here is a script doing the trick.

I assume that you select all the site's page and copy them to the clipboard.
Run the script.
The result is a TAB delimited text in the clipboard.

--[SCRIPT]
property LF : ASCII character 10
property sticky : ASCII character 202
property nbf : 12
on run
set AppleScript's text item delimiters to "" -- for safe


set tt2 to the clipboard as text


set tt to (item 2 of my decoupe(tt2, ¬
"Overall Stats" & LF & sticky & LF & sticky & LF & ¬
"Batting" & LF & "Pitching" & LF)) as text


set tt to (item 1 of my decoupe(tt, ¬
LF & LF & LF & "Search: ")) as text


set ll to my decoupe(tt, LF)
set nbl to (count of ll) div nbf
set liste to {}
repeat with i from 0 to nbl - 1
set j to i * nbf
set rec to (my recolle(items (j + 1) thru ¬
(j + nbf) of ll, tab)) & return


copy rec to end of liste
end repeat


set AppleScript's text item delimiters to ""
set the clipboard to liste as text
end run

-- +-+-+-+-+-+-+-+-+

on oteEspace(t)
return my recolle(my decoupe(t, " "), "")
end oteEspace

on decoupe(t, s)
set AppleScript's text item delimiters to s
return (text items of t)
end decoupe

on recolle(l, s)
set AppleScript's text item delimiters to s
return (l as text)
end recolle
--[/SCRIPT]


Yvan KOENIG
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Data from html table to excel (From: Chris <email@hidden>)

  • Prev by Date: Re: QuarkXPress Print Styles
  • Next by Date: Re: Global Script Menu?
  • Previous by thread: Re: Data from html table to excel
  • Next by thread: Re: Data from html table to excel
  • Index(es):
    • Date
    • Thread