Re: Excel Range Crash
Re: Excel Range Crash
- Subject: Re: Excel Range Crash
- From: Bruce Robertson <email@hidden>
- Date: Mon, 25 Feb 2008 22:31:10 -0800
First of all, I was mistaken about the cells that appear to cause the
problem. Looks like blank cells in a range are the problem for Excel 2008 +
applescript.
Given sheet 2 that contains data in cells A1 through P20, but only cell P20
in column P contains data, the following will instant-crash Excel.
tell application "Microsoft Excel"
set rangeData to Value of Range "A1:P20" of sheet 2 of active workbook
end tell
Range P1:P20 is OK even where only P20 contains data. It appears that if you
try to access a range that has empties in it, you get a crash.
> What line of script caused the crash, in your opinion?
>
> --
> Paul Berkowitz
>
>
>> From: Bruce Robertson <email@hidden>
>> Date: Mon, 25 Feb 2008 21:11:41 -0800
>> To: AppleScript-Users <email@hidden>
>> Subject: Excel Range Crash
>>
>> Trying to do some basic applescripting of Excel.
>>
>> I'm getting application crashes.
>>
>> Excel 2008 (12.0)
>>
>> 10.5.2, Macbook
>>
>> This is a Windows spreadsheet received from a client.
>>
>> The crash appears to result from a sum formula like this:
>>
>> Sum( B2*15, C2*18, D2*18, E2*24 )
>>
>> Where text has been written into one of the cells such as B2, thus causing
>> the sum result to show #Value!
>>
>> Is there a way for applescript to read a cell error like that and not crash
>> the application?
>>
_______________________________________________
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