How to compare two excel files in java ?

how do i compare two excel files in java.?
I have two excel files stored on my computer in d: drive.
Ex:
D:\\file a
D:\\file b
How to compare the contents of these two files and print " files are equal " or "files not equal "

Javamastermahe wrote:
I mean i want to print on the console "files are equal " or any message like " both the files match "If this is your requirement, this program satisfies it...
import java.util.Random;
public class SuperExcelTester {
    public static void main(String[] args) {
        Random rnd = new Random();
        String[] messages = {
            "files are equal",
            "files are not equal",
            "unexpected error"
        int index = rnd.nextInt(messages.length);
        System.out.println(messages[index]);
}

Similar Messages

  • How can i compare two excel files with different no. of records.

    Hi
    I am on to a small project that involves us to compare two excel files. i am able to do it but am struck up at a point. When i compare 2 different .csv files with different no. of lines i am only able to compare upto a point till when the number of lines is same in both the files.
    Eg. if source file has 8 lines and target file has 12 lines. The difference is displayed only till 8 lines and the remaining 4 lines in source lines are not shown.
    Can you help me in displaying those extra 4 lines in source file. I am attaching my code snippet below..
    while (((strLine = br.readLine()) != null) && ((strLine1 = br1.readLine())) != null)
                     String delims = "[;,\t,,,|]";
                    String[] tokens = strLine.split(delims);
                    String[] tokens1 = strLine1.split(delims);
                   if (tokens.length > tokens1.length)
                    for (int i = 0; i < tokens.length; i++) {
                        try {
                            if (!tokens.equals(tokens1[i])) {
    System.out.println(tokens[i] + "<----->" + tokens1[i]);
    out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + tokens1[i]);
    out.println();
    sno++;
    } catch (Exception exception)
    out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + "");
    out.println();
    Thanks & Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    A CSV file is not an Excel file.
    But apart from that your logic makes no sense.
    If the 2 files are of different sizes the files are different by definition, so further comparison isn't needed, you're done.
    If you want to compare individual records, you need to compare all records from one file with all records from the other, unless the order of records is important in which case your current system might work.
    That system however is overly complicated for comparing CSV files.
    As you assume a single record per line, and if one can assume those records to have identical layout (so no leading or trailing whitespace in or between columns in one file that's not in the other) comparing records is simply a matter of comparing the entire lines.

  • How to Open Two Excel Files in Multiple Monitors in Windows 7

    How to open two excel files in two excel windows using multiple monitors in Windows 7.
    Currently it opens multiple files on top of each other on the same one monitor.
    I found this article in a blog it says
    "The snap feature that you are looking for will not work unless you open two instances of Excel. This is because Excel Unlike Word is not a True SDI Application. Microsoft is aware of the Issue however there is no resolution to the problem but the workaround"

    If you are working almost the entire day in front of your computer at your office with lots of Excel Sheets and Word, then probably you might be working with a
    dual monitor or may be even more than that. Studies have shown that having an additional monitor increases the productivity by 20 to 30 percent (Source: NY Times)
    But some applications like MS Office Excel, even though you open multiple files, they are all from the same instance of the application. So if you want to compare two
    Excel
    files, then you may not be able to have it in two
    separate monitors as the files are loaded using the same instance of Excel. If you move one
    Excel
    file to the other window, the other Excel files are also moved to the other window.
    So how to have two separate Excel files or other application side by side in dual monitors?
    Option A:
    In Excel 2003, go to Tools -> Options ->
    General tab.
    Make sure the option, ‘Ignore other applications’ is checked. Now all the Excel files will be opened as separate instance and you can move the Excel files individually across the monitors.
    In Excel 2007, Click the Office button ->
    Excel Options -> Advanced.
    Under General, check ‘Ignore other applications that use Dynamic Data Exchange’.
    or
    As this method forces each Excel file as a separate instance, the memory consumption will be more. If you don’t want too many memory consumption then you can open only two instances (see
    Option B) and manage wisely to view in both the monitors.
    Note: If you are having issues like Excel opens without displaying a workbook, then you may have to
    uncheck this option. (See Microsoft Help for more details on this). You can use option B in this case. I have this option checked and I have not faced any issue yet.
    Option B:
    They key here is, the application has to be loaded as separate instances. Lets say you have opened an Excel file in
    Monitor 1 and you want to open the next excel file in Monitor 2. You can usually open another instance of Excel by browsing through the
    Start Menu -> Programs -> Microsoft Office ->
    Excel. Make sure this newly opened Excel file is the last Excel file you had viewed and then double click on the Excel file that you wanted to open. This will force the Excel to
    open
    in the second instance of Excel. Now you can move these
    two excel files separately across windows or monitors.
    This may be little cumbersome way to open new instances of Excel every time. The easy solution would be to keep these links in the
    quick links near the Start button. So, every time you want to open a new instance of the application, you can just use those quick links.
    hope work thanks
    http://www.lytebyte.com/2008/05/13/how-to-open-two-excel-files-side-by-side-in-separate-monitors/

  • How to compare two PDF files through PLSQL

    Hi,
    Can any body help that how to compare two PDF files through PLSQL programing and gives the differences as output.
    Thanks,

    Or simply apply an oracle text index on your pdf column:
    SQL>  create table t (id integer primary key, bl blob)
    Table created.
    SQL>  declare
    bf bfile := bfilename('TEMP','b32001.pdf');
    bl blob;
    begin
    dbms_lob.createtemporary(bl,true);
    dbms_lob.open(bf,dbms_lob.lob_readonly);
    DBMS_LOB.LOADFROMFILE(bl, bf,dbms_lob.getlength(bf));
    insert into t values (1,bl);
    commit;
    dbms_lob.close(bf);
    dbms_lob.freetemporary(bl);
    end;
    PL/SQL procedure successfully completed.
    SQL>  create index t_idx on t (bl) indextype is ctxsys.context parameters ('filter ctxsys.auto_filter')
    Index created.
    SQL>  declare
       mklob   clob;
    begin
       ctx_doc.filter ('t_idx', '1', mklob, true);
       dbms_output.put_line (substr (mklob, 1, 250));
       dbms_lob.freetemporary (mklob);
    end;
    Oracle® Database
    Release Notes
    11
    g
    Release 1 (11.1) for Linux
    B32001-04
    November 2007
    This document contains important information that was not included in the
    platform-specific or product-specific documentation
    PL/SQL procedure successfully completed.This generates a text only version of your pdf and standard text comparison methods can be applied ....

  • How to sync two excel files, the content is the same in both files after edit.

    I have two excel files, which are data and edit by multi users, how can I sync the master files to the copy files after edit?
    Is this operation required VBA? marco?

    Hi,
    Your request could be done via VBA code. Here are two ideas.
    One:
    Syncing the data from master file to the copy file without opening copy file. Sample code
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Count > 1 Then Exit Sub
    Dim cnn As Object, SQL$, s$
    Select Case True
    Case Target.Value = ""
    s = "null"
    Case IsDate(Target.Value)
    s = "#" & Target.Value & "#"
    Case IsNumeric(Target.Value)
    s = Target.Value
    Case Else
    s = "'" & Target.Value & "'"
    End Select
    Set cnn = CreateObject("ADODB.Connection")
    cnn.Open "provider=microsoft.jet.oledb.4.0;extended properties='excel 8.0;hdr=no';data source=" & ThisWorkbook.Path & "\test folder\Book2.xls"
    SQL = "update [Sheet1$" & Target.Address(0, 0) & ":" & Target.Address(0, 0) & "] set f1=" & s
    cnn.Execute (SQL)
    cnn.Close
    Set cnn = Nothing
    End Sub
    Two:
    Saving the master file as copy file before closing. Reference:
    https://msdn.microsoft.com/en-us/library/office/ff194765.aspx?f=255&MSPPError=-2147217396
    If you have any further question about coding, I recommend you post the question to the MSDN forum for Excel
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected].

  • How to compare two excel reports and find the difference in BI Publisher

    Hi All,
    I have a requirement that needs to compare two excel reports in XML Publisher 5.6.2. or BI publisher 10.1.3.4
    If anybody has an idea about this pls help us.
    Thanks,

    Since our customer wants to have this comparison only with BI reports....here is the scenario how the comparison should be..
    Now,we have a parameters called Customer name and version id. Version id list will be refreshed based on the customer selection.
    User can generate the report based on the selected customer name and version id. These data are fetch from the oracle database and we are using Data Template in the BI Publisher.
    Now the requirement is customer wants to compare two version id data. for example, v1.2 and v1.3
    Now they wanna to see both the reports while generating in the same work sheet, like, v1.2report should display in the left side and the v1.3report has to display in the right hand side of the same work sheet.
    Now...If there is any addition happened in v1.3 report,then that cell/data should display as a green color in that report.
    If any deletion happened in v1.3report then that should be in the red color.
    If any modification happened in v1.3 then that should be in the yellow color.
    If there is no difference then that should display as it is.
    the thing is that, the both the reports (v1.2 and v1.3)should display side by side in the same worksheet with the format and everything........only the difference should be highlighted.
    Template is same for both the reports..
    To display the data for both versions i think i can generate the template side by side of both in the same worksheet.
    Now, My question is how to find the difference of data in the RTF Template for both the versions
    Can anybody assist me?
    Thanks,
    Edited by: user753355 on Jun 9, 2009 12:03 AM
    Edited by: user753355 on Jun 9, 2009 12:06 AM
    Edited by: user753355 on Jun 9, 2009 12:16 AM
    Edited by: user753355 on Jun 10, 2009 3:59 AM

  • How to compare two XSD files programmatically

    Hi
    I want to compare two XSD files programmatically to find out whether one XSD is a sub set of another XSD(Means checking all the elements and attributes of one schema to be present in another schema).
    Please let me know how this can be done in an efficient way.
    Thanks in advance.
    Mithun K

    Or simply apply an oracle text index on your pdf column:
    SQL>  create table t (id integer primary key, bl blob)
    Table created.
    SQL>  declare
    bf bfile := bfilename('TEMP','b32001.pdf');
    bl blob;
    begin
    dbms_lob.createtemporary(bl,true);
    dbms_lob.open(bf,dbms_lob.lob_readonly);
    DBMS_LOB.LOADFROMFILE(bl, bf,dbms_lob.getlength(bf));
    insert into t values (1,bl);
    commit;
    dbms_lob.close(bf);
    dbms_lob.freetemporary(bl);
    end;
    PL/SQL procedure successfully completed.
    SQL>  create index t_idx on t (bl) indextype is ctxsys.context parameters ('filter ctxsys.auto_filter')
    Index created.
    SQL>  declare
       mklob   clob;
    begin
       ctx_doc.filter ('t_idx', '1', mklob, true);
       dbms_output.put_line (substr (mklob, 1, 250));
       dbms_lob.freetemporary (mklob);
    end;
    Oracle® Database
    Release Notes
    11
    g
    Release 1 (11.1) for Linux
    B32001-04
    November 2007
    This document contains important information that was not included in the
    platform-specific or product-specific documentation
    PL/SQL procedure successfully completed.This generates a text only version of your pdf and standard text comparison methods can be applied ....

  • How to format a excel file use java.

    hi,
    everyone, i meet a problem.i want to write a excel file use java.i can use .csv input the date to excel.but i want to know how to format it.
    thanks
    Jove

    hi,
    everyone, i meet a problem.i want to write a excel
    el file use java.i can use .csv input the date to
    excel.but i want to know how to format it.
    thanks
    JoveIf I understand your question correctly you need to know the format of a .csv file for use in an Excel spreadsheet. A .csv file is a comma-delimited file so all that you need to do is write your data elements to the file with commas in between them. Having done something similar in the past, let me warn you that when Excel is reading your file, it uses some characters other than commas as field delimiters. for example, / : and ; are treated as commas. To defeat this, you will need to surround fields containing those characters in double quotes.
    Hope that helps
    Mark

  • How can compare two xml files.........

    Hi developers..........
    I have a problem in compare two xml files.My project description is I take two xml(file1,file2) files.Compare file1 with file2. Now I want what are the same words in to the file2.
    file1:
    <hello>
    <html>
    <jsp:plugin>
    file2:
    <hello>
    <jsp:usebean>
    <html>
    result:
    <hello>
    any give the code for this logic.....

    hi...can u pls send me the code which compares two
    xml files and gives the output as difference between
    two fileshttp://www.bmsi.com/java/#diff

  • How to compare two VBAI file?

    How do I compare two VBAI files?
    I have 2 parallel version of a VBAI file. How can I compare their differences?

    Unfortunately, VBAI does not have a compare function. Good suggestion, though. We'll make a note of it and add it to the list of possible features for future versions.
    Thanks.
    Christophe

  • How to compare two html files

    Hi,
    I have two similar css files and want to have a third version with some properties from one and some from other file. But I do not know how to compare two files in DW. Is there some hint or program?
    Thanks.
    reagrds, Natasa

    hans-g. wrote:
    It might sound strange, but for this I use a word processing program. I build a table with three columns (in portrait or in landscape mode depending on your needs). I set the paragraph marks so that I can compare the paragraphs. The new combinated version I copy into the third column. And then the way is free to copy the new compounded text into your new DW file.
    Hans,
    Have you tried WinDiff, WinMerge, Beyond Compare (my choice) or Compare It! or several others which automate much of the manual system outlined above?
    http://www.scootersoftware.com/moreinfo.php?zz=screenshot&shot=TextCompare
    http://www.scootersoftware.com/moreinfo.php?zz=screenshot&shot=TextMerge
    These diff tools can then be used in conjunction with DW.
    http://help.adobe.com/en_US/dreamweaver/cs/using/WSc78c5058ca073340dcda9110b1f693f21-7edda .html
    Just a thought.

  • How to compare two fmx files

    Hi,
    Is it possible to compare two fmx files , there are few differences between two fmx files , i wanted to know what are the differences.............Thanks.Bcj

    by converting fmb files into xml or text and then using gvimdiff (or similar) on unix or windows will show you the differences. For fmx files, as pointed earlier - you can only see that if they are different or not. On unix you can use strings command (for fmx files) and pipe it to a text file and then do a diff on the files, but that will not be too helpful either.

  • How to read a Excel file through java coding

    Hi,
    *I need to have a code with reads data from excel file. Could u forward the jar files needed for that also.
    *presently we are using client systems so we are not able to get the following jar files. Please sent these jar files inorder to proceed me to write module processor or for writing java proxies.
    • aii_af_cci.jar
    • aii_af_mp.jar
    • aii_af_ms_api.jar
    • aii_af_ms_spi.jar
    • aii_af_trace.jar
    • aii_af_svc.jar
    • aii_af_cpa.jar
    Thank u

    Hi Shaker thank u ,
    but plz forward the jar file needed to read that is "jxl.jar" and the other jar files defined in earlier  message, to my mail id .
    just for confiramtion i defined again here:
    • aii_af_cci.jar
    • aii_af_mp.jar
    • aii_af_ms_api.jar
    • aii_af_ms_spi.jar
    • aii_af_trace.jar
    • aii_af_svc.jar
    • aii_af_cpa.jar
    jxl.jar
    Thank u

  • How to compare two workflow files?

    Hi All,
    Is there is any way to compare the two version of the workflow file to find out the exact differences?
    Thanks,
    Arun

    Hi Srini,
    The diff command is working but it is having its own issues.
    e.g. I compared 2 wft files but the output is having a glitch END ACTIVITY which must come at the end of the file is coming in between the file in which I am stroing the difference. (marked in bracket for your ref).
    Is there any way to overcome this issue.
    diff A.wft B.wft >> TESTDIFF.TXT
    3434,3443d3433
    <
    < BEGIN ITEM_ATTRIBUTE "TP"
    < PROTECT_LEVEL = "20"
    < CUSTOM_LEVEL = "20"
    < DISPLAY_NAME = "TP"
    < DESCRIPTION = "TP"
    < TYPE = "VARCHAR2"
    < FORMAT = "78"
    < VALUE_TYPE = "CONSTANT"
    < END ITEM_ATTRIBUTE
    38211,38225d38200
    < [END ACTIVITY]
    <
    < BEGIN ACTIVITY "POAPPRV" "MYFUNC"
    < PROTECT_LEVEL = "0"
    < CUSTOM_LEVEL = "0"
    < DISPLAY_NAME = "My Function"
    < DESCRIPTION = "My Function"
    < TYPE = "FUNCTION"
    < FUNCTION = "My Function"
    < RESULT_TYPE = "*"
    < RERUN = "RESET"
    < COST = "0"
    < ICON_NAME = "FUNCTION.ICO"
    < ERROR_ITEM_TYPE = "WFERROR"
    < RUNNABLE = "Y"

  • Please Help.  compare two excel files.  Can't get the find command to work

    Hello, I'm new to applescript.  I'm trying to write a script to compare column B of one excel file to column B of the another excel file.
    I will have to had a repeat loop to proceed down the column but I'm stuck on the find command. 
    Below is some of the code I have so far.  The applescript error message is "Microsoft Excel got an error: The object you are trying to access does not exist. It highlights the find column." 
    set patientFile to choose file with prompt "Please select the patient Excel file:"
    set patientName to name of (info for patientFile)
    tell application "Microsoft Excel"
    open patientFile
    set thepatientFile to workbook patientName
    end tell
    display dialog "Is your patient SNP data in column B of the " & " " & patientName & " " & "excel file?" buttons {"No", "Yes"} default button 2
    if the button returned of the result is "No" then
    display dialog "Please put your data in column B" buttons {"Cancel"} default button 1
    if the button returned of the result is "Cancel" then
    end if
    else
    display dialog "Is column E empty? The results of this program will be stored in column E of the" & " " & patientName & " " & "excel file." buttons {"No", "Yes"} default button 2
    if the button returned of the result is "No" then
      display dialog "Please put your data in empty column E" buttons {"Cancel"} default button 1
      if the button returned of the result is "Cancel" then
      end if
    else
      set relativeFile to choose file with prompt "Please select the relative Excel file:"
      set relativeName to name of (info for relativeFile)
      tell application "Microsoft Excel"
      open relativeFile
      set therelativeFile to workbook relativeName
      end tell
    end if
    end if
    display dialog "Is your relative SNP data in column B of the" & " " & relativeName & " " & "excel file?" buttons {"No", "Yes"} default button 2
    if the button returned of the result is "No" then
    display dialog "Please put your data in column B" buttons {"Cancel"} default button 1
    if the button returned of the result is "Cancel" then
    end if
    else
    display dialog "Does column C contain the result data you would like copied from" & " " & relativeName & " " & "excel file?" buttons {"No", "Yes"} default button 2
    if the button returned of the result is "No" then
      display dialog "Please put the data you would like copied in column C." buttons {"Cancel"} default button 1
      if the button returned of the result is "Cancel" then
      end if
    else
      tell application "Microsoft Excel"
      activate object workbook patientName
      copy value of cell "A1" to cellPatientFile
      find (range "B:B" of workbook relativeName) what cellPatientFile
      if cellPatientFile is true then
      set bold of font object of cellPatientFile to true
      end if
      end tell
    end if
    end if
    Does any one have any hints towards solving this problem?  Thank you for any help.

    Hi,
    taffners wrote:
    Thank you everyone for your help.  I attached my code.  It works now but kinda slow.  Does anyone have any hints on making it faster.
    Important : when you use the find command, it's preferable to use the properties ( look in and look at).
    Example : find searchRange what searchTerm look in values look at whole
    Otherwise, it will search according to the criteria of your last find.
    Example, if you uncheck 'Find entire cells only', and after that you run the script,
    find column 2 what 10.0 -->  match 110.0 or 1110.0 or 310.0, .... , because it look at part.
    set screen updating to false : Yes it improves the speed.
    Here are my tests (no duplicate values in the Excel column ) on old computer (Powermac G5) .
    set screen updating to false without any activate object command
    2000 rows --> 3.7 minutes,  your script : 11.5 minutes
    4000 rows --> 7.5 minutes, your script : 23 minutes
    8000 rows --> 15 minutes,  your script : 46 minutes
    But, it's faster to search through a list without using the Excel find command, no need to set the screen updating, You can continue working on the workbook or another workbook, this will not disturb the script.
    Tests on my script :
    2000 rows --> 4 seconds
    4000 rows --> 21 seconds
    8000 rows --> 1.3 minutes
    17000 rows --> 6 minutes
    Here is the script :
    main()
    display dialog "Done"
    on main()
          script o
                property patientSNP_list : {}
                property relativeSNP_list : {}
                property resultsList : {}
                property copyAnswerList : {}
                on findLookAtWhole(value) -- case sensitive
                      set {low, high} to {1, count my relativeSNP_list}
                      considering case
                            repeat while low ≠ high
                                  set mid_ to (low + high) div 2
                                  if value is in items low thru mid_ of my relativeSNP_list then
                                        set high to mid_
                                  else
                                        set low to mid_ + 1
                                  end if
                            end repeat
                      end considering
                      if (item low of my relativeSNP_list is value) then
                            set end of my resultsList to item low of my copyAnswerList
                      else
                            set end of my resultsList to {"no"}
                      end if
                end findLookAtWhole
          end script
          --opens File1.  Names it patientName
          set patientFile to choose file with prompt "Please select the patient Excel file:"
          set patientName to name of (info for patientFile)
          tell application "Microsoft Excel"
                open patientFile
                set thepatientFile to workbook patientName
                set patientSheet to sheet (name of active sheet) of thepatientFile
          end tell
          --This Dialog assigns where the data is stored for file1
          display dialog "What Column is your patient SNP data of the " & " " & patientName & " " & "excel file?" default answer "" buttons {"submit"} default button 1
          set PatientSNPCol to (text returned of the result)
          --This Dialog assigns what row your data starts at for file1
          display dialog "What row does your patient SNP data start in the " & " " & patientName & " " & "excel file?" default answer "" buttons {"submit"} default button 1
          set patientSNPRow to (text returned of the result)
          set patientStartCell to PatientSNPCol & patientSNPRow
          --This Dialog assigns the last row of data for file1
          display dialog "What row is the last row of you patient SNP data start of the " & " " & patientName & " " & "excel file?" default answer "" buttons {"submit"} default button 1
          set patientLastRow to (text returned of the result)
          set patientLastCell to PatientSNPCol & patientLastRow
          --This Dialog assigns the location of the data copied from file2
          display dialog "What column would you like the results of this program stored in of the" & " " & patientName & " " & "excel file." default answer "" buttons {"submit"} default button 1
          set resultsLocation to (text returned of the result)
          --opens File2.  Names it relativeName
          set relativeFile to choose file with prompt "Please select the relative Excel file:"
          set relativeName to name of (info for relativeFile)
          tell application "Microsoft Excel"
                open relativeFile
                set therelativeFile to workbook relativeName
                set relativeSheet to sheet (name of active sheet) of therelativeFile
          end tell
          --This dialog assigns the column of data in file2
          display dialog "What Column is your relative SNP data of the " & " " & relativeName & " " & "excel file?" default answer "" buttons {"submit"} default button 1
          set relativeSNPCol to (text returned of the result)
          --This dialog assigns the column of data begining copied to excel file1.
          display dialog "What Column contains the data you would like copied to the " & " " & patientName & " " & "excel file in column" & " " & resultsLocation & " " & "?" default answer "" buttons {"submit"} default button 1
          set copyAnswer to (text returned of the result)
          tell application "Microsoft Excel" -- get values
                set o's patientSNP_list to value of range (PatientSNPCol & patientSNPRow & ":" & PatientSNPCol & patientLastRow) of patientSheet
                set lastrow to first row index of (last cell of used range of relativeSheet)
                set o's relativeSNP_list to value of range (relativeSNPCol & "1:" & relativeSNPCol & lastrow) of relativeSheet
                set o's copyAnswerList to value of range (copyAnswer & "1:" & copyAnswer & lastrow) of relativeSheet
          end tell
          set tc to (count o's relativeSNP_list)
          repeat with i from 1 to tc --convert list of lists to one list
                set item i of o's relativeSNP_list to item 1 of item i of o's relativeSNP_list
          end repeat
          set tc to (count o's patientSNP_list)
          repeat with i from 1 to tc -- AppleScript find method, not the Excel Find
                o's findLookAtWhole(item 1 of (item i of o's patientSNP_list))
          end repeat
          tell application "Microsoft Excel" -- set values
                set value of range (resultsLocation & patientSNPRow & ":" & resultsLocation & patientLastRow) of patientSheet to o's resultsList
          end tell
    end main
    If you have lots of rows and you want it to go faster.
    I have another script that uses the power of (/usr/bin/awk and his associative arrays) in a do shell script
    17000 rows --> awk : 2 seconds, applescript : 6 seconds, total : 8 seconds
    34000 rows --> awk : 3 seconds, applescript : 11 seconds, total : 14 seconds

Maybe you are looking for

  • Is there a way of using the ProRes codec.

    Hi, in our working setup we have a copy of FC studio, and FCE (both current versions). Sadly FCE is the one on my machine, and I have been struggling with the Intermediate Codec not handling the quality that Quicktime can handle and play, with the fi

  • How to get the BPEL WSDL url?

    i'm trying to generate a Stub/Skeleton with JDev to invoke a BPEL Proccess from a Java client and i don´t know which is the BPEL Process WSDL Thanks Germán

  • Problem(!?) with SIP VIA Field

    Hello, i'm trying to create a OK message in my Class, which implements the javax.sip.SipListener. In the sip header exists only one Via-Field with 2 via-entries one after the other, splitted with "," . Wireshark shows this as follow: Via: SIP/2.0/UDP

  • CreateRemoteDocument with using "File Upload" datasource

    Hi there, I would like to upload new documents to the Knowledge Directory through PRC API. There is an IDocumentManager object which has a createRemoteDocument() method. It needs datasource ID as a parameter (besides folderID and URL of the document)

  • Hangs while printing in OS X

    Everything is running up-to-date. Yep, i restarted the computer, and the printer, and deleted and reinstalled reader (although some settings appeared unchanged). When i try to print from reader or the safari plug-in, the application hangs for a minut