• 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: Importing to Excel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Importing to Excel


  • Subject: Re: Importing to Excel
  • From: Courtney Moore <email@hidden>
  • Date: Thu, 14 Aug 2003 13:41:46 -0500

On 8/14/03 1:34 AM, "David Wignall" <email@hidden> wrote:

> on 14/8/2003 9:08 AM, Courtney Moore at email@hidden wrote:
>
>> Hello all you fellow apple scripters.
>
> Hello
>
>> I am attempting to learn how to script excel.
>> Does anyone have any guidance or references? Or simply a starting point?
>
> 1) Recording is your friend
>
> 2) Have a look at the VBA Help and compare it with Excel's dictionary
>
>> What I would like to do is create a script that will
>> Get external data and import text file, set the delimiters as commas
>> Then format one of the cells as numbers and set it to 6 decimal places
>> And then save the finished worksheet.
>> Simple right?!!
>
> Simple. Right :)
>
> 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
>
Thank you so much. I agree that recording is good!! Unfourtanetly when I
try to record it only records as much as
Tell application "Microsoft Excel"
Activate
End tell

It won't record when I open a file..???

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??

Thank you very much for your help!
_______________________________________________
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.

  • Follow-Ups:
    • Re: Importing to Excel
      • From: David Wignall <email@hidden>
References: 
 >Re: Importing to Excel (From: David Wignall <email@hidden>)

  • Prev by Date: Re: Changing the 'invisible' property
  • Next by Date: Re: Mail scripting
  • Previous by thread: Re: Importing to Excel
  • Next by thread: Re: Importing to Excel
  • Index(es):
    • Date
    • Thread