• 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: "Christian Sonntag <email@hidden>" <email@hidden>
  • Date: Fri, 8 May 2009 22:12:41 +0200

This one works for me:

property theFilepath : "/Users/yourusername/Desktop/filename.txt"

set theFile to POSIX file theFilepath as text

tell application "Microsoft Excel"
save workbook as workbook 1 filename theFile file format text Mac file format
end tell

But i have no solution for "with replacing". 
It looks like that there is no option for this in the dictionary.

Best Regards,
Christian Sonntag
(OS X 10.5.6 / Excel 2004 11.5.3)

Am 08.05.2009 um 21:00 schrieb email@hidden:

Von: Oakley Masten <email@hidden>
Datum: 7. Mai 2009 21:44:35 MESZ
An: Users Group AppleScript <email@hidden>
Betreff: Excel Save as text question


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

Thanks
Oakley



Von: Oakley Masten <email@hidden>
Datum: 7. Mai 2009 21:53:41 MESZ
An: Users Group AppleScript <email@hidden>
Betreff: re:Excel Save as text question


Sorry - I forgot to add.

Using Excel 2004 on OSX 10.4.11

Thanks
Oakley

 _______________________________________________
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:
    • Replicate command in Canvas 8
      • From: Jean-Louis Tremblay <email@hidden>
  • Prev by Date: Re: How do I expand the "Open Recent" number of displayed (last opened) items ?
  • Next by Date: RE: RE: Excel Save as text question
  • Previous by thread: re:Excel Save as text question
  • Next by thread: Replicate command in Canvas 8
  • Index(es):
    • Date
    • Thread