RE: Import txt file in Excel and set cell options
RE: Import txt file in Excel and set cell options
- Subject: RE: Import txt file in Excel and set cell options
- From: email@hidden
- Date: Wed, 18 May 2011 14:00:51 +0000
- Sensitivity: Normal
> Who can help me with this:
> -- Working on a Applescript to open txt files in Excel.
> tell application "Microsoft Excel" -- version 12.0.0
> open {file (item i of my_TXT_Files as string)} -- so far so good
> -- How do I tell Excel to format all imported data/cells as text
> (e.g. instead of general)? Just like I could do when I import a txt
> file in Excel by hand (step 3 of the import wizard).
> end tell
> Thaks in advance for any help.
> Bert.
Hi Bert,
Would something like this work for you?
tell application "Microsoft Excel"
open {file (item i of my_TXT_Files as string)}
tell active workbook
tell active sheet's used range
set number format to "@"
end tell
end tell
end tell
Jay
_______________________________________________
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