Tuesday, 18 October 2011

Import a data sheet into your test at runtime.


' =============================================================
' function: ImportDataSheet
' desc : Imports a single data sheet
' params : strFile - full path of the xls file with the sheet
' strSource - name of the sheet on the xls
' strTarget - name of the sheet to import it to
' returns : void
' =============================================================

Function ImportDataSheet(strFile, strSource, strTarget)

 

Dim objFS

 

' create a file system object
Set objFS = CreateObject("Scripting.FileSystemObject")

 

' check that the source file exists
If objFS.FileExists(strFile) Then

 

    ' ensure that our target sheet exists
    DataTable.AddSheet strTarget

 

    ' import the sheet
    DataTable.Importsheet strFile, strSource, strTarget

 

Else

 

    ' fail if the xls was not found
    Reporter.ReportEvent micFail, "Import Data Table""Unable to Import Data Table From '" & strFile & "', File Does Not Exist"

 

End If

 

' destroy the object
Set objFS = Nothing

 

End Function 'ImportDataSheet


15 comments:

  1. I think the admin of this website is truly working hard in support of his web site, because here every data is quality based
    stuff.

    Also visit my blog post minecraft

    ReplyDelete
  2. Hey would you mind sharing which blog platform you're working
    with? I'm planning to start my own blog soon but
    I'm having a difficult time deciding between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design seems different then most blogs and I'm
    looking for something completely unique.
    P.S Sorry for being off-topic but I had to ask!

    Here is my page ... linked web page

    ReplyDelete
  3. Howdy are using Wordpress for your site platform?
    I'm new to the blog world but I'm trying to get started and set up my own.
    Do you require any coding expertise to make your own blog?
    Any help would be really appreciated!

    Also visit my webpage :: corporate jet rental

    ReplyDelete
  4. Hi my loved one! I wish to say that this post is
    awesome, great written and include approximately
    all significant infos. I would like to see more posts like this .


    My weblog ... medical negligence

    ReplyDelete
  5. Hi! I just wanted to ask if you ever have
    any issues with hackers? My last blog (wordpress) was hacked
    and I ended up losing several weeks of hard work due to no backup.
    Do you have any methods to protect against hackers?


    Also visit my site ... recruitment agency jobs london

    ReplyDelete
  6. As the admin of this web page is working, no question very quickly it will be famous, due to its
    quality contents.

    Also visit my webpage - london seo services

    ReplyDelete
  7. Hello, yes this piece of writing is truly good and I have
    learned lot of things from it on the topic of blogging.
    thanks.

    Feel free to surf to my weblog :: website owners

    ReplyDelete
  8. Unquestionably believe that that you said. Your favorite
    reason appeared to be at the web the simplest thing to take into
    accout of. I say to you, I definitely get irked whilst
    folks think about worries that they plainly do not recognise about.
    You controlled to hit the nail upon the highest and outlined out
    the entire thing with no need side-effects , other folks can take a signal.

    Will likely be back to get more. Thanks

    Here is my weblog :: royalty free commercial music

    ReplyDelete
  9. Thanks for one's marvelous posting! I actually enjoyed reading it, you could be a great author.I will be sure to
    bookmark your blog and definitely will come back later in life.

    I want to encourage yourself to continue your great writing,
    have a nice morning!

    Feel free to surf to my site :: business success

    ReplyDelete
  10. Very energetic blog, I enjoyed that a lot. Will there be a part 2?


    Stop by my web-site ... different forms of social media

    ReplyDelete
  11. Great blog you've got here.. It's hard to find good quality writing like yours nowadays.
    I honestly appreciate individuals like you! Take care!!


    Here is my web-site social media books

    ReplyDelete
  12. I used to be able to find good advice from your blog posts.


    Here is my web site ... buy a house in london

    ReplyDelete
  13. It's nearly impossible to find knowledgeable people on this topic, however, you seem like you know what you're talking about!
    Thanks

    Also visit my webpage ... cases of medical negligence

    ReplyDelete
  14. Thanks for finally talking about > "Import a data sheet into your test at runtime." < Liked it!

    my web page: two best
    networking

    ReplyDelete
  15. I read this post completely concerning the resemblance of hottest and preceding technologies, it's
    remarkable article.

    Review my weblog: importing cars to uk

    ReplyDelete