The value become wrong when get value by using AppleScript while other worksheet is active.

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

I just want to send a bug report.

Summary:
The value become wrong when get value by using AppleScript while other worksheet is active.

Description:
1. Create an AppleScript file with below script.
    tell application "Microsoft Excel"
    activate
    set OriginalWorkbook to workbook "Workbook1"
    set OriginalData to string value of column 1 of row 1 of worksheet 1 of OriginalWorkbook
    end tell
2. Launch Excel 2008 and create a Workbook called "Workbook1".
3. Enter time data "11:23 PM" into A1 cell and then committed.
4. Create another workbook called "Workbook2".
5. Execute the AppleScript that created in step 1 while "Workbook2" is active.

Result>>0.97305556 set to OriginalData instead of 11:23 PM. Seems like the cell format not applied correctly from Workbook1.
Expected>>11:23 PM should be set to OriginalData.
0
8/15/2008 1:09:24 AM
mac.office 7017 articles. 0 followers. Follow

2 Replies
661 Views

Similar Articles

[PageSpeed] 10

I can't tell you how to correct your script - I'm not a writer of such - but
dates & times in Excel are actually numerical values. How they display in
the cell is determined by the formatting applied to the cell. Your script is
importing the value but I see nothing that formats the cell for Time. IOW,
the time value is what's being entered into the cell on the second sheet as
though it were typed in that manner, not being imported as "11.23 PM".

HTH |:>) 
Bob Jones 
[MVP] Office:Mac



On 8/14/08 9:09 PM, in article 59b56efa.-1@webcrossing.caR9absDaxw,
"Matthew_Minami@officeformac.com" <Matthew_Minami@officeformac.com> wrote:

> Version: 2008
> Operating System: Mac OS X 10.5 (Leopard)
> Processor: Intel
> 
> I just want to send a bug report.
> 
> Summary:
> The value become wrong when get value by using AppleScript while other
> worksheet is active.
> 
> Description:
> 1. Create an AppleScript file with below script.
>     tell application "Microsoft Excel"
>     activate
>     set OriginalWorkbook to workbook "Workbook1"
>     set OriginalData to string value of column 1 of row 1 of worksheet 1 of
> OriginalWorkbook
>     end tell
> 2. Launch Excel 2008 and create a Workbook called "Workbook1".
> 3. Enter time data "11:23 PM" into A1 cell and then committed.
> 4. Create another workbook called "Workbook2".
> 5. Execute the AppleScript that created in step 1 while "Workbook2" is active.
> 
> Result>>0.97305556 set to OriginalData instead of 11:23 PM. Seems like the
> cell format not applied correctly from Workbook1.
> Expected>>11:23 PM should be set to OriginalData.

0
8/15/2008 11:18:58 AM
On 8/14/08 9:09 PM, in article 59b56efa.-1@webcrossing.caR9absDaxw,
"Matthew_Minami@officeformac.com" <Matthew_Minami@officeformac.com> wrote:

> Version: 2008
> Operating System: Mac OS X 10.5 (Leopard)
> Processor: Intel
> 
> I just want to send a bug report.
> 
> Summary:
> The value become wrong when get value by using AppleScript while other
> worksheet is active.
> 
> Description:
> 1. Create an AppleScript file with below script.
>     tell application "Microsoft Excel"
>     activate
>     set OriginalWorkbook to workbook "Workbook1"
>     set OriginalData to string value of column 1 of row 1 of worksheet 1 of
> OriginalWorkbook
>     end tell
> 2. Launch Excel 2008 and create a Workbook called "Workbook1".
> 3. Enter time data "11:23 PM" into A1 cell and then committed.
> 4. Create another workbook called "Workbook2".
> 5. Execute the AppleScript that created in step 1 while "Workbook2" is active.
> 
> Result>>0.97305556 set to OriginalData instead of 11:23 PM. Seems like the
> cell format not applied correctly from Workbook1.
> Expected>>11:23 PM should be set to OriginalData.
Looks to me like things are working fine. .973.... IS 11:23PM. You need to
get the text of the cell, not the cell's value.

-- 
Bob Greenblatt [MVP], Macintosh
bobgreenblattATmsnDOTcom

0
bob6686 (387)
8/15/2008 11:42:44 AM
Reply:

Similar Artilces:

How to draw 2D values to windows screen??
Suppose now I have a 2D array containing binary values only (1 or 0). I would like to draw these values on the windows screen (created by MFC dialog-based app in MSVC++ 2005) with 0 be black (0, 0, 0) and 1 be white (255, 255, 255). Which MFC class and function should I use to achieve this effect?? Newbie Question wrote: > Suppose now I have a 2D array containing binary values only (1 or 0). I would > like to draw these values on the windows screen (created by MFC dialog-based > app in MSVC++ 2005) with 0 be black (0, 0, 0) and 1 be white (255, 255, 255). > Which MFC class a...

Using outlook 2003 do I need exchange server to share databases?
We are considering upgrading to outlook 2003. Can I and my assistant share my database of contacts and calendar? thanks for any information See http://www.slipstick.com/outlook/share.htm MeNotHome wrote: > We are considering upgrading to outlook 2003. Can I and my assistant > share my database of contacts and calendar? > > thanks for any information Is this a realiable option? Thanks On Fri, 20 Feb 2004 12:47:56 -0500, "Lanwench [MVP - Exchange]" <lanwench@heybuddy.donotsendme.unsolicitedmail.atyahoo.com> wrote: >See http://www.slipstick.com/outlook/...

Cancelled article by mistake. How can I get it back?
I 'blacked out' a page of an article I typed in My Documents thinking I would be making an attachment of it and by mistake hit the spacer key and lost it all. Is it possible to get it back if I've done that? Once you save the document, the answer is: no, unfortunately. In future, as soon as you do something like that, press CTRL+Z to undo the change. Or simply close the document and when asked whether you want to save changes, answer in the negative. Daddy "Chris1934" <Chris1934@discussions.microsoft.com> wrote in message news:9EACEC90-1641-4B06...

Adding some values on a sheet???
Hello and thanks in advance. I'm working on a calculator for some Cable TV plants designs. Here is what I need: I'd like to have a drop down menu with several different values of design in it. When I click on a value, I'd like it to insert some "value specific" numbers on this type of chart below...... 30 mhz= Ch 5= Ch 40= Ch 78= Ch 80= Ch 116= Any ideas on how I go about that and where to insert and store the info for each type of "value" Cheers! Doug Strinz Hudson Falls, NY Hi Doug Strinz, Assume that you have a worksheet named 'master'. On ...

text value
I need to rank a column containing concatonated names and addresses. Ranking only handles numeric values, is there any way to give text a numeric value? Hi, It would have helped to see some test data but let's start from here. With your data in column A starting in A2 enter this in b2 and drag down =COUNTIF($A$2:$A$100,"<"&A2)+1 -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "AllyH" wrote: > I need to rank a colum...

Recently used File List
Can someone tell me why, after downloading a template from the Microsoft website my recently used file list dumps the files I have just used from the list when I close Excel. All I ever have now are the downloaded Excel templates listed and cannot get rid of them. Thank you Rob ...

Seperation of Exchange from active directory
Hi all, we are having active directory integrated exchange server. Due to heavy load, now we want to seperate active directory and exchange server in 2 diferrent servers. Can any help me how to go about it. OS - 2K3 standard Exchange - 2k3 standard There is a good KB article for Nuevo's recommendation. The KB is KB822931 http://support.microsoft.com/support/kb/822931 Don't forget to move your FSMO roles, DNS (if needed), etc. if you decide to remove the first DC. -- Bob Christian II MVP - LCS http://bobchristian.blogspot.com - Blog "Nuevo" <imaneophyte@gmail...

Value Axis Scale Change Problem #2
Thanks Jon - problem solved -- dp_fulche ----------------------------------------------------------------------- dp_fulcher's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=969 View this thread: http://www.excelforum.com/showthread.php?threadid=27033 ...

How to retrieve value from specific cell value?
Does anyone have any suggestions on how to retrieve value from specific cell value with specific worksheet? I would like to create a if-statement within macro, If specific cell within specific worksheet = 1 then process following code End If Does anyone have any suggestions? Thanks in advance for any suggestions Eric hi If Sheets("sheet1").Range("A1") = 1 Then MsgBox "run code" Else MsgBox "skip code" End If regards FSt1 "Eric" wrote: > Does anyone have any suggestions on how to retrieve value from specific cell &...

Item Value List vs Item Movement History Report (including cost)
I have been trying to create reports for previous points in time, but I am so confused at this point as to what is what. I've ran an Item Value list, which shows the current value of items, and got an extended cost. Then I ran an Item Movement History Report that includes cost with a filter that begins before the store opened and ends today. The extended cost in this report was very close, but not the same as the extended cost in the Item Value list. Is there something that the Item Movement History Report takes into account that the Item Value list doesn't, or vise versa? Beca...

Multiple Value Lookup field
I need to add multiple values to a look up field and I just found out that new to Access 2007 I can add multi-values to my look-up fields. I just tried doing this, but for some reason in the look-up wizard there is no check box that says "Allow Multiple Values", so then I went to the Lookup tab in the field properties to see if there was an Allow Multiple Values property and there was none. Not sure if this would mean anything, but this table was converted from Access 2003 to Access 2007. Why do I not have this option and what I can do about it? On Mon, 12 Nov 2007 12:58:0...

POP3 / SMTP Using Exchange Question
I have a need to have a connection to Exchange as well as multiple POP3 accounts. Currently my default account is one of the POP3 accounts. I am having problems replying to emails that come into one of the POP3 accounts. I don't know what the problem is. Is there a way that I should be doing this? Here are the details. Say my POP3 account is mike@robbie.com. My Exchange (Active Directory) email address is mike@bobby.com. I have two accounts configured in Outlook, 1 Exchange and 1 POP3. I know my settings are correct since individually everything works fine. If I set my default acc...

using a Publisher calendar simultaneously
Using a common, networked drive, my co-workers and I are able to share and work in an Access database at the same time. Is it possible to do this with a calendar created in Publisher? Is it possible for one person to leave the calendar open to review often while another person is adding information? On Fri, 20 Jan 2006 19:22:03 +0000, Bonnie wrote (in article <BD5C9B9B-C527-4829-8934-05512BC8DD30@microsoft.com>): > Using a common, networked drive, my co-workers and I are able to share and > work in an Access database at the same time. Is it possible to do this with > a ...

Unique Values from Access
Dear all, I'm trying to create a validation list with data from access. The code below already do it, but I have a big problem: in the field of access database I can have duplicate data... table: period fields year_month year_quarter year 200701 200701 2007 200702 200701 2007 200703 200701 2007 200704 200702 2007 .. .. .. And the code below brings duplicate data. How can I solve this problem? I wouldn't like to bring all information to excel ...

Which Function do I use
I want excel to give me each scenerio of adding either some or all of a group of numbers, whether they were positve or negative, that would yield a particular value. For example, the avaiable group has the numbers 1, 2, 3, 4 and 5 and I want to know what combination of those five numbers when added together, either using all of the numbers or only part of them or even switching some of their signs to negative, would give me the value of 3. So, the answer I want from excel is to say: 1+2=3 or 4-1=3 or 5-2=3 or 2+4-3=3 or 5+4-3-2-1=3, etc. Anybody have any clue how to setup that syste...

HTML Scrapping using XmlTextReader
Greetings. Just wondering if it is possible to use XmlTextReader to read off a html doc: e.g. XmlTextReader tr = new XmlTextReader ("http://localhost/test.xml"); where test.xml contains the following: <table cellspacing="1" cellpadding="1" width="100%"> <tr valign="top"> <td class="head" width="20%">test heading1</td> <td class="head" width="10%">test heading2</td> </tr> <tr valign="top"> <td class="content" width=&quo...

How to total a column of cells without using Autosum
Help me remember please. I used to be able to quickly total a rance of cells by simply highlighting them. The total would then appear in the fx box. I can't seem to remember how do do this. I'm using Excell in Office 2003. Thanks Hi, Select a cell directly under or to the side of the range and click the auto-sum button (sigma) button -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Goldar" wrote: > Help me remember please. I us...

Default values
How can I set up default values for text box fields for new records? Fore example: I would like to set up default value for Country so when user creates new account - country field is populated with that vaue. Thanks, m Hi there You would need to use a picklist field instead of a text field and add a value for each country. You can then set the default country. This is all done in Systom Customisation > Customise Form. Other than this you could use a workflow based on Account Create. Insert a condition to check the country field is null, and insert an action to update the country fi...

Can't Assign Value to this Object
I think I've seen this problem before but I can't remember the reason or solution. I have a form (in add mode) whose record source is a single table. For most fields on the form, the user will input data, but for a couple of fields I am trying to populate them with the values of global variables. I've got the global variables working (I can assign one to an unbound text box on the form), but when I try to assign the variable value to a bound text box, I get an error message that "Run-time error 2448: You can't assign a value to this object". Here is ...

Populate cell with a value if another cell has a certain value
All, good morning. i have a issue, i need to populate cell E4 with a value CX/025966 when cell F4 has a text Bond Street. Is there a simple way of doin this? EXCEL 2007 Try:- =IF((F4="Bond Street"),"CX/025966","") If my comments have helped please hit Yes. Thanks. "B2ORL" wrote: > All, good morning. i have a issue, i need to populate cell E4 with a value > CX/025966 when cell F4 has a text Bond Street. > > Is there a simple way of doin this? Use IF() =IF(F4="Bond Street","CX/02...

Lookup a value in a table and display text if a value exists
I have a customer database form named frmMain with a field called txtAgency. I also have a table that has a column of agency codes that are in the Outlook Global directory. The table is called tbl_Global and consist of about 40 records. If the user inputs an agency that is within this table on the frmMain, I want the phone number field (txtPhone) on the database form to automatically display "See Outlook". If the agency is not within this list, I want the end user to be able input a value on the form. What is the best way to go about this? Use DLookup() to get t...

Need a lookup formula that matches 2 values and returns the 3rd va
I neeed to merge 16000 rows of data with some duplicate vales. Poor record keeping lead to two lists and each was updated independantly if at all. Some orders show up one list and not the other so I can't just sort or do a dup search. I'm trying to recreate this data and track the status of all orders for the past 12 months. When orders were shipped out in parts the same order number was used and this has been a nightmare trying to sort the duplicates and match the dates. I need a formula for F that returns the current status based on the order number and date. I tried a...

How to get rid of the fonts list in Control Panel?
Hello, I installed a little program from Moon Software, called Font Loader (having forgotten it is crap, their Font Explorer Lite is fantastic and I thought that's what it was) and I believe it had the option of showing all the fonts in Control Panel. I have uninstalled it, the fonts have remained. I have installed it, changed the options, the fonts remain. I have (again) uninstalled it and the damn fonts are still there. I don't want them there. Does anyone know how to get rid of that CP (presumably) fonts.cpl (although there is no such file on the system) thing?...

Summing visible column values but not hidden column values
I need to write a SUM function that will add up the numbers in several columns of data (for example, A4:S4), but I only want it to add those columns that are visible, not those that are hidden. Is there any way to have Excel add only the numbers in the visible columns, not in any hidden columns? Thanks. Hi have you hiddent he columns manually?. If yes you'll need VBA -- Regards Frank Kabel Frankfurt, Germany "BW" <BW@discussions.microsoft.com> schrieb im Newsbeitrag news:CBAFDFDF-FFFD-4521-97EC-CD3941FD8686@microsoft.com... > I need to write a SUM function that ...

HELP! Chart Zero Values
Hi, I'm new to this forum...I hope someone can help. I have just become trainee Office Trainer, and a delegate has asked me a question that can't immediately help her with. She has a job interview thi afternoon and has been given some Excel tasks to do. She has been asked to create a scatter chart using 2 columns of data i the spreadsheet. How do you get the chart to not display the data i either the x or y axis data is null? I know you can get the chart to not display the values if both x and are zero, but what if just one of the axis is zero? If anyone can help me with this ...