• 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: Excel Save as text question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Excel Save as text question


  • Subject: Re: Excel Save as text question
  • From: Stan Cleveland <email@hidden>
  • Date: Thu, 07 May 2009 15:47:22 -0700
  • Thread-topic: Excel Save as text question

Title: Re: Excel Save as text question
On 5/7/09 12:44 PM, "Oakley Masten" wrote:

This saves the file with the name and path just fine but it is not really a text(tab delimited) file.
It is still some kind of Excel file.
What am I doing wrong here?

set TargetFolder to "Macintosh HD:Users:omasten:Desktop:ExcelTest"
set theSaveName to (TargetFolder as text) & "
:" & "FirstFile.txt"
tell application "
Microsoft Excel"
activate
set OriginalSaveFormat to default save format
--
Change the defalut save format
set default save format to text Mac
--
set default save format to workbook normal file format
tell active sheet
save as
filename theSaveName with replacing
end tell
set
default save format to OriginalSaveFormat
end tell

I want to create a new file.
Then populate it with data.
They save it as a txt file.

Also the "with Replacing" doesn't appear to work all the time.
Any help would be appreciated

Oakley, you seem to have two Excel syntax errors. First, you must use the full constant “text Mac file format”, not just “text Mac”. Second, the correct “save” command parameter is “with overwrite”, not “with replacing”.

Make those two changes and see if things don’t work better for you.

HTH,
Stan C.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Excel Save as text question
      • From: Oakley Masten <email@hidden>
References: 
 >Excel Save as text question (From: Oakley Masten <email@hidden>)

  • Prev by Date: re:Excel Save as text question
  • Next by Date: How do I expand the "Open Recent" number of displayed (last opened) items ?
  • Previous by thread: Excel Save as text question
  • Next by thread: Re: Excel Save as text question
  • Index(es):
    • Date
    • Thread