Re: Importing to Excel
Re: Importing to Excel
- Subject: Re: Importing to Excel
- From: Courtney Moore <email@hidden>
- Date: Thu, 14 Aug 2003 14:59:22 -0500
On 8/14/03 1:53 PM, "David Wignall" <email@hidden> wrote:
>
on 15/8/2003 6:41 AM, Courtney Moore at email@hidden wrote:
>
>
> On 8/14/03 1:34 AM, "David Wignall" <email@hidden> wrote:
>
>
>> tell application "Microsoft Excel"
>
>>
>
>> set TextFileToImport to (choose file) as string
>
>>
>
>> OpenText TextFileToImport with CommaDelimiter
>
>> set NumberFormat of Range ("B:B") to "#.000000"
>
>> Save ActiveWorkbook In (((path to desktop) as string) & "Text
>
>> Import.xls") As xlNormal -- save... is one line
>
>>
>
>> end tell
>
> I tried the syntax you gave me but it is failing on the
>
> "Open Text TextFileToImport with commaDelimiter"
>
>
>
> And yes I did set TextFileToImport to the name of the file I wanted to
>
> import??
>
>
Did you use the entire file path as in "HD:Users:You:Documents:Example.txt"?
>
Here is the syntax that I used:
set TextFileToImport to "Users:courtney:Desktop:AStest.txt" as string
tell application "Microsoft Excel"
Open text TextFileToImport with CommmaDelimiter
set NumberFormat of Range ("B:B") to "#.000000"
end tell
Thanks again
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.