SPONSORS:






User Tag List

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

Thread: file open

  1. #1
    Junior Member
    Join Date
    Jun 2005
    Location
    chennai
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    file open

    Hello everyone

    I need ur help on this topic

    How do i open a .csv file(Command)
    how do i open .txt and .xls file(Command)

  2. #2
    Junior Member
    Join Date
    Jun 2004
    Location
    Wilmington DE
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: file open

    use the FileSystemObject
    you can get to it through the Microsoft Scripting Runtime Ref. and or the Windows Scripting Host Ref.

    with that you can use OpenTextFile, this will work on csv and txt files....
    As for the .xls you need a reference to Microsoft Excel then you can access .xls files by doing things like
    Dim oxl as Excel.Application
    Dim wb as Excel.Workbook
    Dim ws as Excel.Worksheet
    set oxl = new Excel.Application
    set wb = oxl.Workbooks.New (or oxl.Workbooks.Open "file.xls")
    set ws = wb.Worksheets(1)

    etc.....
    bother me and I will replace you with a very small .shell script

    debugging is a state of mind

  3. #3
    Senior Member
    Join Date
    Sep 2001
    Location
    Philly
    Posts
    1,231
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: file open

    simplist way of doing data-driven testing...

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Open &quot;c:\sample.txt&quot; For Input As #1

    Do While Not EOF(1)


    Input #1, sFirst, sLast, sAddress, sPhone

    MsgBox sFirst
    MsgBox sLast
    MsgBox sAddress
    MsgBox sPhone

    Loop

    Close #1</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">
    ~Alias~

 

 

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.71%
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:02 AM.

Copyright BetaSoft Inc.