Working with Excel 2008

Couple of questions... can't seem to activate different worksheets within a workbook. Do I just call them by name? i.e.
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #FFDDFF;
overflow: auto;"
title="this text can be pasted into the Script Editor">
activate object workbook "09-10 Teacherdata.xlsx"
activate worksheet "sheet 1" </pre>
if I have multiple ones is it just sheet1, sheet 2... or whatever I name them?
2nd question...I'd like to open an excel file using a list to allow me the ability to call different file names within a loop. Can;t quite get it to work...something like this?
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #FFDDFF;
overflow: auto;"
title="this text can be pasted into the Script Editor">
set deptname to {"English", "Humanities", "Mathematics", "Language", "Science", "Arts"}
set deptnamefile to {"MacBook HD:Users:Dano:Desktop:English Schedules 10-11.xlsx", "MacBook HD:Users:Dano:Desktop:Humanities Schedules 10-11.xlsx", "MacBook HD:Users:Dano:Desktop:Mathematics Schedules 10-11.xlsx", "MacBook HD:Users:Dano:Desktop:Language Schedules 10-11.xlsx", "MacBook HD:Users:Dano:Desktop:Science Schedules 10-11.xlsx", "MacBook HD:Users:Dano:Desktop:Arts Schedules 10-11.xlsx"}
repeat with i from 1 to 6
if item 5 of cvalue = item i of deptname then
copy item 2 of cvalue to slotvalue
tell application "Microsoft Excel"
activate
open file item i of deptnamefile
activate object workbook item i of deptname & "Schedules 10-11.xlsx"
</pre>
Thanks in advance for the help!
dan

Hi Bernard,
Thanks for the response. You helped me about a year ago on some iCal scripting that worked out great, Thanks again! With Excel I have a set of data that looks like this 20501,B,T1441,101 where the items are unique id # for an academic class, slot during the day when the class is taught (ranges from A to H), Teacher id #, second unique id # for the academic class. I have written a script that puts in a 5th piece of info of the academic department name based on the unique id (works fine), and was then trying to move the data into an series of worksheets (one for each academic department) which would give me a visual of the teacher's schedule during the week. The excel file is set up to do this based on the occurrence of the teaching slots that show up in row 3, columns J through Q. So I have 6 different Excel files (6 academic departments) with each file having 10 or so sheets in them (each sheet for a unique teacher). Looking to get the data out of the original Excel file (20501,B,T1441,101) and into the department files, specifically into row 3, columns J through Q. Here is the full script of what I have attempted. I disabled the "open file item i of deptnamefile" since I couldn't get it to work and was playing around with just getting the script to move some of the data over into those department specific files when I posted the question. Any insight would be appreciated.
dan
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px; height: 340px;
color: #000000;
background-color: #FFDDFF;
overflow: auto;"
title="this text can be pasted into the Script Editor">
-- Works with an already opened Excel file [csv is ok] to move a scheduled sections into a daily Schedule  for the courses taught by a teacher.  Each Excel file will be dept based and have multiple workbooks
tell application "Microsoft Excel"
activate
open file "MacBook HD:Users:Dano:Desktop:09-10 Teacherdata.xlsx"
activate object workbook "09-10 Teacherdata.xlsx"
activate object worksheet "Sheet 1"
get value of used range of worksheet 1 of file "MacBook HD:Users:Dano:Desktop:09-10 Teacherdata.xlsx"
copy the result to wholedata
set lvalue to length of wholedata
set counter to lvalue
set cellnum to 1
set cellid to ""
set slotvalue to ""
repeat with i from 2 to counter
set cvalue to {0, 0, 0, 0, 0}
copy item i of wholedata to cvalue
set deptname to {"English", "Humanities", "Mathematics", "Language", "Science", "Arts"}
set deptnamefile to {"MacBook HD:Users:Dano:Desktop:English Schedules 10-11.xlsx", "MacBook HD:Users:Dano:Desktop:Humanities Schedules 10-11.xlsx", "MacBook HD:Users:Dano:Desktop:Mathematics Schedules 10-11.xlsx", "MacBook HD:Users:Dano:Desktop:Language Schedules 10-11.xlsx", "MacBook HD:Users:Dano:Desktop:Science Schedules 10-11.xlsx", "MacBook HD:Users:Dano:Desktop:Arts Schedules 10-11.xlsx"}
set columnchoices to {"J", "K", "L", "M", "N", "O", "P", "Q"}
set teachingslot to {"A ", "B ", "C ", "D ", "F ", "G ", "H "}
repeat with i from 1 to 6
if item 5 of cvalue = item i of deptname then
copy item 2 of cvalue to slotvalue
tell application "Microsoft Excel"
activate
open file "MacBook HD:Users:Dano:Desktop:English Schedules 10-11.xlsx"
---open file item i of deptnamefile---
activate object workbook "MacBook HD:Users:Dano:Desktop:English Schedules 10-11.xlsx"
activate object workbook item i of deptname & "Schedules 10-11.xlsx"
repeat with i from 1 to 7
if slotvalue = item i of teachingslot then
set cellid to item i of columnchoices & "3"
set formula of cell cellid to item i of teachingslot
end if
end repeat
end tell
end if
end repeat
end repeat
set onepiece to {}
set lastrow to {}
set courseID to {}
end tell </pre>

Similar Messages

  • What apple software allows me to open and work with excel files?

    What Apple software allows me to open and work with Excel files?

    Numbers, OpenOffice, Microsoft Office 2008 or newer, or similar products. Microsoft Office 2004 doesn't work in 10.7.
    (86805)

  • Working with Excel spreadsheet embedded in access table

    Hello!
    I have Access DB which contain Excel spreadsheet objects embedded in table. To work with DB I use ADO-Tool based on ActiveX. Data passed to my program from GetRows method as 2D array of variants. As I understand I should convert variant to object refnum and then use this refnum with property and invoke nodes to get data from spreadsheet. How to select data type for VariantToData to work with Excel spreadseet?

    Hi,
    Isn't it the same that using Index Array function? I believe that problem is in conversion of variant to refnum. For example, if I change refnum data type to string in Variant To Data, no error appears, and I've got some text data (see the attachment).
    Attachments:
    Temp.zip ‏25 KB

  • Will Nvidia GT 120 work with Early 2008 MacPro 2.8 3,1 with 30 inch ACD

    Will Apple's Nvidia GT 120 work with Early 2008 MacPro 2.8 3,1 with 30 inch ACD and MacOS 10.6.2:
    http://store.apple.com/us/product/MC002ZM/A?mco=MTQ2MjQ0NTQ
    Leon McKee

    Malcolm, thanks for taking the time to respond. I'll purchase the card this week and bring her back to life. Thanks!
    Leon McKee

  • Essbase Add-In v6.2 not working with Excel 97

    I am running client Windows NT 4.0sp6 with Excel 97 and just tried to upgrade the Essbase Excel Add-In to version 6.2.1 from 6.0. The add-in appears to work fine for all Essbase functions except Essbase-Options. When I select Essbase-Options, I immediately get an Excel.exe application error as follows:The instruction at "0x01e412b5" referenced memory at "0x0000003c". The memory could not be read.My upgraded v6.2.1 Application manager appears to run fine. Anybody got any ideas?? According to Hyperion documentation, v6.2.1 works with Excel 97.

     

  • What´s the best approach to work with Excel, csv files

    Hi gurus. I got a question for you. According to your experience what's the best approach to work with Excel or csv files that have to be uploaded through DataServices to you datawarehouse.
    Let's say your end-user, who is not a programmer, creates a group of 4 excel files with different calculations in a monthly basis, so they can generate a set of reports from their datawarehouse once the files have been uploaded to tables in your DWH. The calculations vary from month to month. The user doesn't have a front-end to upload the excel files directly to Data Services. The end user needs to keep a track of which person uploaded the files for a determined month.
    1. The end user should place their 4 excel files in a shared directory that will be seen by DataServices.
    2. DataServices will execute certain scheduled job that will read the four files and upload them to the Datawarehouse at a determined time, lets say at 9:00pm.
    It makes me wonder... what happens if the user needs to present their reports immediately so they can´t wait until 9:00pm.  Is it possible for the end user to execute some kind of action (out of the DataServices Environment) so DataServices "could know" that it has to process those files right now, instead of waiting for the night schedule?
    Is there a way that DS will track who was the person who uploaded those files?
    Would it be better to build a front-end for the end user so they can upload their four files directlyto the datawarehouse?
    Waiting for your comments to resolve this dilemma
    Best Regards
    Erika

    Hi,
    There are functions in DS that captures the input files automatically. You could use file_exists() or wait_for_file() option to do that. Schedule the job to run every certain minute and if the file exists then run. This could be done by using a certain file name with date and timestamp etc or after running move the old files to archive and DS wait for new files to show up.
    Check this - Selective Reading and Postprocessing - Enterprise Information Management - SCN Wiki
    Hope this helps.
    Arun

  • F2 key does not work with excel

    Dear Friends,
    when i am working with excel, f2 key does not work as its shortcut. can you please help me how i can solve this. thanks a lot

    what if you press Fn + F2? Does anything pop up?
    Regards,
    Jin Li
    May this year, be the year of 'DO'!
    I am a volunteer, and not a paid staff of Lenovo or Microsoft

  • Working with excel What is the Best free app?

    What is the Best free app for Working with excel on the iPad 3?

    Here is one , I Googled your question
    http://blogs.computerworld.com/20102/excel_on_my_ipad_free

  • Does ADI 11i version work with Excel XP ?

    Hi,
    If anyone knows how to get ADI version for 11i to work with Excel XP, It would be a mirical.
    I have been getting problems running the software on some PC's. And on some it will get as far as trying to create the template journal in Excel then run time error out.
    Best regards,

    Afternoon I was wondering if you could explain how you got ADI. I am curently running Windows XP with Office XP and Oracle 9i client. The ADi ver is 7.1.12.10.05. I am told that you need to install Oracle SQLNET 7, 2.3.4 and Oracle Sqlnet 8 NET 806 to allow ADI to work. Is that correct ?

  • Help needed in working with Excel

    i have a ms excel template with n number of columns.
    I need to add a new column using sql code. Can anyone tell me what is the code??? thx in advance...

    Erm i tink the final db is excel and no more.
    the db given to me is in excel and i can do whatever with it but the final output have to be in excel.
    ( i initially imported the excel db to access and everything is out running fine. But as i wont be using the application after i had it out. So i thought it would be better to allow it to work on excel thus saving the trouble of importing and exporting)
    I have to work with a few db(all excel) and they each contains 40 000 - 80 000 records...(i dun knw if that is considered small or large)
    I have limited knowledge on access macros and sql and the knowledge i had on them does not permit me to carry out the operations i wan.(and im required to develop an application with GUI)
    thx for all helps and comments guyz...

  • Time Capsule Dual: Working with Excel files in Windows Computer

    We just purchased the latest-gen Time Capsule to replace another earlier edition TC and we are having a strange problem. We have three iMacs and one PowerBook G4 connected wirelessly to the TC, along with two Windows XP machines which are wired in to the TC. The issue is that the two WinXP machines cannot view Excel files from the TC. When they try to open and work with an Excel file from the TC, they get a message that there is not enough memory to open, work with, or save any Excel files and it won't let them open the Excel file at all. If they copy the file from the TC to the local WinXP computer, they can open it and work on it just fine. At first I thought the issue would be with the new TC, but I plugged back the old TC and it has the exact same problem. The only commonality between the two is that I foolishly updated the firmware on both to 7.4.1. The old TC was working just fine until I installed 7.4.1, and then it started to have the same problem handling the Excel files.
    By the way, none of the Macs have any problems accessing and working on the Excel files off the TC, this only happens to the WinXP machines. Also, it only happens on the Excel files; we have other types of files in the TC and all of them seem to open and work just fine. But Excel is our mainstay so we're looking for a solution, can anyone help?

    Same happened to me a while back when i updated the firmware 7.4.1 . the macs were ok but the Windows PC's sharing the Time capsule would not save any excel files as errors like memory too low
    etc started to appear. easy way to correct this was to got into airport Utility and downgrade back to 7.3.2 , from the menu , you can select what firmware rev you want to go back to select downgrade to 7.3.2 and everything will work ok after this, remember to deselect auto update and check for firmware in the Airport pref till Apple get this sorted out.
    Cheers ian

  • Working with excel files in C#, in a web farm

    I am creating a excel file uploader that after the upload, searches for specific columns, saves data to SQL Server, then gets rid of the excel file.
    I will be accepting .xls & xlsx file types.  The internal file structure should be all fairly standard because this is an internal company app.  So for example, the sheet with the data I am searching for may not always be the first in the book,
    but it will always have the same name.
    From the research I have done, it seems I can use the Interop library or OpenXML.  I am leaning towards interop.  Because we are on a web farm, I think it would be best to not save the file, just work with it in memory. Would this be a concern
    if the files are only only around 50kb? I am only expecting 100 uploads a month.
    If it is preferred or required I save the file before pulling the data out, should I save it to the application directory on the web server and expect it to be ok because I am saving/processing/deleting in one request? Or is there a better solution?  I
    thought of saving to our file share but that opens a whole new bucket of worms because of having to send credentials with the file when saving.
    Simon.

    Hi Simon,
    Open XML SDK can only manipulate Office 2007 and above versions. Since your web form accepts Excel 2003 file, it's not a good choice. But if you want to use the PIA(Primary Interop Assembly) to automate the excel files, it's also not recommened. Neither
    of these two options are suitable in your case, you need to use some 3rd-party library to help you, as recommened in this Microsoft KB article.
    http://support.microsoft.com/kb/257757/en-au
    If your business requires the server-side creation of the Office 97,   Office 2000, Office XP, and Office
    2003 binary file formats, third-party   vendors offer components that can help you. Microsoft does not provide any   such components, so you will need to either build a solution yourself or   purchase one from a third-party vendor. Many different
    third-party products   are available. You should investigate each solution to best match the vendor   to your business needs.If you want to build your own solution that edits the   Office 97, Office 2000, Office XP, and Office 2003 binary file
    formats   directly, you can obtain the file format specifications for free under the   terms of the Microsoft Open Specification Promise (OSP). No technical support   is available for the documentation or for the products that you create, but
      documentation is available. For more information, visit the following Web   site:
    http://www.microsoft.com/interop/docs/officebinaryformats.mspx
    As far as I know, NPOI is a good choice for you. You can search and try it. But as it's a 3rd-party library, we don't provide support for it. It also provide ability to process the worksheet in the memory.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Generate a new SAP mode maximized and active working with Excel or Word

    Hello!
    We have an event that it generates a new SAP mode in the desktop. This mode is generated ok (maximized and active) if the user is working in other SAP mode in this moment.
    But this mode is generated minimized if the user is working with a Word or Excel Microsoft document in this moment.
    We need to generate this new mode: ACTIVE and MAXIMIZED when the user is working wiht any non SAP tool in that moment. Is this possible??
    We have checked the following functions module with  failed results:
    NAVIGATION_EXECUTE_OBJECT
    ECATT_START_GUI_REMOTE
    TH_CREATE_MODE
    Thanks in advance!!
    Regards,
    Message was edited by:
            Elisa Villellas

    Could you try disabling graphics hardware acceleration? (I'm having trouble determining from your "More system information" whether it's enabled or disabled.) Since this feature was added to Firefox, it has gradually improved, but there still are a few glitches.
    You usually need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
    orange Firefox button ''or'' classic Tools menu > Options > Advanced
    On the "General" mini-tab, uncheck the box for "Use hardware acceleration when available"
    If you restart Firefox, is the issue resolved?

  • Num pad doesn't work with Excel.

    The numeric pad behaves like scrolls and page up, page down buttons every time I use Microsoft's Excel. I looked everywhere but i couldn't find a way to change the pad to work with numbers. Its driving me crazy ...
    G5 Dual 2.3GHz   Mac OS X (10.4.4)  

    Sounds like you are using a third-party keyboard: the new Apple keyboards do not have a Num Lock key and the numeric keypad always functions as such.
    If you're using a third-party keyboard, and if you installed vendor-provided software to customize the keyboard, check its preferences and also check the vendor's Web site to see if there is an updated version of the software for your keyboard.
    I cannot reproduce the problem using the latest model of Apple Pro keyboard (the one that came with my computer, which is the same as your computer).
    2. You might also want to state the specific keyboard and version of Excel you are using in case someone else has the same configuration and can try to reproduce the problem. I tried it with Excel from Office v.X.
    3. You wrote: "* Deleted Excel Preferences"Both of them, yes?
    - Home > Library > Preferences > com.microsoft.excel.plist (you may or may not have this one).
    - Home > Library > Preferences > Microsoft > Microsoft Excel
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X

  • Is it possible to save and work with Excel on my Ipad?

    I need to do more than just view Excel files on my Ipad..what are my options?

    Get Numbers. Its an apple app that lets you work on excel documents. I use it from time to time with work. There is a few office apps, but I havent used them before. Once you bring up numbers in the app store, the other apps will pop up that are related.

Maybe you are looking for

  • What is this error and how to solve it.

    Hi, I am getting this error while executing it. Warning Characteristic COUNTRY no longer exists in InfoProvider. Abort Characteristic Country not available in InfoProvider. Error Query ZTAR_BIL_QRY1 could not be opened. Thanks in Advance. Regards, Ra

  • Miix 2 11 Sd Card reader wird nicht mehr erkannt

    Hallo, mein Problem besteht darin das mein SD Card reader vom Miix 2 11 von einen auf den anderen Tag nicht mehr funktioniert. Ich habe das Tablet schon komplett zurückgesetzt, doch leider hat das nichts genützt. Könntet ihr mir bei dem Problem helfe

  • Sequence of condition different in Po and MIRO for import PO

    Hi,   While making the import PO we add the custom condition in PO in sequence as below JCV1     CVD Percentage     10.000 JECV     Edu.Cess on CVD     2.000 J1CV     SEcess on CVD     1.000 so as per above it is easy in a sequence of 10, 2, and 1 bu

  • How do I sync Toplink Cache with my Database?

    Hey guys, We are running macro's through an excel sheet that connects to the database and performs Updates and Inserts. Since this database update is NOT taking place through TopLink (in a Unit of Work) - we do not see the database changes through th

  • Jawbone headset and MB Pro

    Any tips for getting a solid connection between my MB Pro and my BT headset? It pairs OK, but then drops immediately (trying to use Skype 2.6.0.184). TIA. Jeff