R
ray
I'm trying to find the AppleScript equivalent of saving a sheet as tab-
delimited text, but I'm either misunderstanding the available "as"
constants, or have run into a bug. I'm using Excel 11.3.3 under OS
10.4.9 on an Intel-based Mac.
Example:
tell application "Microsoft Excel"
save active workbook in (folderPath & textFileName) as text Mac
end tell
This does indeed save the active sheet as tab-delimited text. The
problems:
*Cells which are formatted as dates dd-mon-yy change the year to four
digits
*Cells which are formatted "#,##0.00" drop any trailing zeros
This is *not* the case when I manually save a file as Text (Tab
Delimited). The text stays the same as it appears in the worksheet.
However, the problem also occurs if I use copy range to put the text
on the clipboard. Is this a bug?
So far, I'm considering the option of repeating through each cell to
get the string value, or GUI scripting the Save As process. Neither is
a great alternative.
Thanks in advance for any help.
Ray Robertson
AppleScript Pro Sessions Denver, June 18-22
<http://scriptingmatters.com/aspro>
delimited text, but I'm either misunderstanding the available "as"
constants, or have run into a bug. I'm using Excel 11.3.3 under OS
10.4.9 on an Intel-based Mac.
Example:
tell application "Microsoft Excel"
save active workbook in (folderPath & textFileName) as text Mac
end tell
This does indeed save the active sheet as tab-delimited text. The
problems:
*Cells which are formatted as dates dd-mon-yy change the year to four
digits
*Cells which are formatted "#,##0.00" drop any trailing zeros
This is *not* the case when I manually save a file as Text (Tab
Delimited). The text stays the same as it appears in the worksheet.
However, the problem also occurs if I use copy range to put the text
on the clipboard. Is this a bug?
So far, I'm considering the option of repeating through each cell to
get the string value, or GUI scripting the Save As process. Neither is
a great alternative.
Thanks in advance for any help.
Ray Robertson
AppleScript Pro Sessions Denver, June 18-22
<http://scriptingmatters.com/aspro>