SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5

Thread: Reading Excel

  1. #1
    Apprentice
    Join Date
    Apr 2005
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Reading Excel

    Hey guys ... I am new to functional tester and Java. Was following some info here and have pulled in the Java Excel API as I need to read data from Excel files and write data to Excel files. I think I have all setup correctly however when simply trying to create a workbook per the tutorial I get an error stating: "Unhandled exception type BiffException".

    See my code below:
    import resources.Script1Helper;
    import com.rational.test.ft.*;
    import com.rational.test.ft.object.interfaces.*;
    import com.rational.test.ft.object.interfaces.SAP.*;
    import com.rational.test.ft.object.interfaces.WPF.*;
    import com.rational.test.ft.object.interfaces.dojo.*;
    import com.rational.test.ft.object.interfaces.siebel.*;
    import com.rational.test.ft.object.interfaces.flex.*;
    import com.rational.test.ft.object.interfaces.generichtml subdomain.*;
    import com.ibm.rational.test.ft.object.interfaces.sapwebp ortal.*;
    import com.rational.test.ft.script.*;
    import com.rational.test.ft.value.*;
    import com.rational.test.ft.vp.*;
    import java.io.File;
    import java.util.Date;
    import jxl.*;

    /**
    * Description : Functional Test Script
    * @author jcannon
    */
    public class Script1 extends Script1Helper
    {
    /**
    * Script Name : <b>Script1</b>
    * Generated : <b>Feb 19, 2010 1:32:06 PM</b>
    * Description : Functional Test Script
    * Original Host : WinNT Version 5.1 Build 2600 (S)
    *
    */
    public void testMain(Object[] args)
    {

    setSimplifiedScriptLine(1); //// TODO Insert code here
    // TODO Insert code here

    Workbook workbook = Workbook.getWorkbook(new File("myfile.xls")); // this is the line that fails


    }
    }

    What should I look into for something like this?

    Thanks!!!!

  2. #2
    Member
    Join Date
    Jan 2009
    Posts
    62
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Reading Excel

    hi there,

    I never tried the java excel api, however was successful using http://poi.apache.org/
    Tiberiu Hajas
    Software engineer
    http://www.000webhost.com/266351.html

  3. #3
    Member
    Join Date
    Jul 2009
    Location
    Hyderabad,INDIA
    Posts
    382
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Reading Excel

    What is the error you are getting??
    Thanks and Regards,
    Sathish

  4. #4
    Member
    Join Date
    Sep 2006
    Posts
    204
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Reading Excel

    use exception handling in the main function.Its mandatory

    try
    {
    Workbook workbook = Workbook.getWorkbook(new File("myfile.xls"));
    }
    catch(Exception e){e.printStackTrace();}

  5. #5
    Apprentice
    Join Date
    Apr 2005
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Reading Excel

    Thanks for the assistance guys ... this got me moving again [img]/images/graemlins/laugh.gif[/img]

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 08:03 AM.

Copyright BetaSoft Inc.