• 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: Lots of Excel text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lots of Excel text


  • Subject: Re: Lots of Excel text
  • From: Hanaan Rosenthal <email@hidden>
  • Date: Mon, 18 Jul 2005 21:22:40 -0400

Yes, the Excel search replace is great, but my problem is that the word I am looking for may be broken between cell 1 and cell 2.
I will ask the man in-charge to break the text between tags and not in the middle of a word.


Thanks for the help!
Hanaan

On Jul 18, 2005, at 5:11 PM, Paul Berkowitz wrote:

On 7/18/05 1:50 PM, "Hanaan Rosenthal" <email@hidden> wrote:


I have a problem with Excel that requires me to take a whole bunch of text
from an Excel cells and do the following:
1. Combine two or more cells (each has 30000 characters, other than the last
one that has less).
2. Search and replace text in the combined string.
3. Split the text back to 30000 character blocks.
4. Place each block back in cells A1, B1, C1...


I can't use copy/paste of set value since these are limited in size.
Any suggestions?
I tried a bunch of export/import tests and got close...
I can export the worksheet as text, combine it, search and replace and re-
save to text.
Placing the long chunks of text in Excel is the big issue.



Excel has its own really powerful 'find' and 'replace' commands (Text Suite). I suggest you use that instead - it's super-fast. (And _much_ simpler than in Word.)

set theResult to replace (used range of active sheet) what searchString
replacement replacementString


with lots of optional parameters for range of cells, case, diacritics,
control characters, even the way to do the search.

Again, the Excel AppleScript Reference will explain any things you're not
sure of, but the dictionary is pretty clear.


Pretty well anything - make that anything - you can do in the Excel UI can
be done by AppleScript, and it will be much faster than extracting strings
to do AppleScript manipulations on and then put back. I had a lot of fun
converting my Excel X scripts (which could already do a lot of this,
including Replace) to 2004 versions which can do it all.


It's really worth your while looking for these ways in the dictionary,
Hanaan, before starting out using the tedious approaches that you'd need in
most other apps (or no app). Excel is made for calculations and
substitutions - sometimes just doing an Excel Formula by script is faster
and easier even than using the AppleScript terms. The Help is pretty good
for those.


--
Paul Berkowitz


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


This email sent to email@hidden


_______________________________________________ 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: 
 >Re: Lots of Excel text (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: Display Alert Giving Up After Broken?
  • Next by Date: Defing a Path correctly
  • Previous by thread: Re: Lots of Excel text
  • Next by thread: Display Alert Giving Up After Broken?
  • Index(es):
    • Date
    • Thread