SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Dec 2004
    Location
    USA
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Write in to Excel file

    I need write test report when a test step has been executed in the QA Run Script. Can anyone please tell me how I can write in to excel file from QA Run Script.

    Thanks in advance
    Regards,
    Prashant B.
    A CANDLE LOSES NOTHING BY LIGHTING ANOTHER CANDLES.

  2. #2
    Senior Member
    Join Date
    Apr 2004
    Location
    Crewe, England
    Posts
    304
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Write in to Excel file

    As far as I'm aware the only way to write to an Excel file in QA Run is by using a QA Run script to open Excel, open the file, make the changes and then save it!
    Graham

  3. #3
    Junior Member
    Join Date
    Aug 2005
    Location
    NJ
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Write in to Excel file

    yes u can write to any file (xls, csv, html) with QARun by using the "Write" command. You must know what the delimiter for the file. E.G. if u want to write a tab delimited excel file use chr(9) along with the data that u want to write.

    e.g write( filename, chr(9)+ data).
    -Cheers
    Nuraq

  4. #4
    Senior Member
    Join Date
    Apr 2004
    Location
    Crewe, England
    Posts
    304
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Write in to Excel file

    Careful, the Write command is a text command.

    Using a tab delimiter may make it possible to import the file into Excel but I doubt you'd be able to open an Excel file and write to it this way.
    Graham

  5. #5
    Junior Member
    Join Date
    Aug 2005
    Location
    NJ
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Write in to Excel file

    Yes, manipulating an Excel File is not possible in QARun but it could be done in Test Partner.

    As for the problem in hand, you can always save this file as excel, after the file has been generated.
    -Cheers
    Nuraq

  6. #6
    Senior Member
    Join Date
    Apr 2004
    Location
    Crewe, England
    Posts
    304
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Write in to Excel file

    Agree, this would work provided all that is required is to produce a file useable by Excel.

    However, if the requirement involves actually opening and writing to an existing Excel file and then saving it we agree that this type of file manipulation cannot be done directly in QARun

    Regards
    Graham

  7. #7
    Senior Member
    Join Date
    Sep 2004
    Location
    UK
    Posts
    107
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Write in to Excel file

    As an excel file is a csv file i.e comma seperated, you can just do:

    Open( "c:\excelFile.csv" , "readwrite" )
    WriteLine("c:\excelFile.csv", "cell1,cell2, cell3")
    Close("c:\excelFile.csv")

    Seperating each cell value with a comma, and have another WriteLine call for every row in the excel file.

    Coxy

  8. #8
    Member
    Join Date
    Aug 2004
    Location
    Leeds
    Posts
    155
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Write in to Excel file

    Originally posted by Coxy:
    As an excel file is a csv file i.e comma seperated, you can just do:

    Open( "c:\excelFile.csv" , "readwrite" )
    WriteLine("c:\excelFile.csv", "cell1,cell2, cell3")
    Close("c:\excelFile.csv")

    Seperating each cell value with a comma, and have another WriteLine call for every row in the excel file.

    Coxy
    <font size="2" face="Verdana, Arial, Helvetica">That's only true if the excel spreadsheet has been saved as a CSV. It's misleading to say "an excel file is a csv file", excel uses it's own proprietary file format when it creates .xls spreadsheets. You can however have a standard or procedure to always save spreadsheets as CSV from within excel, but that file format does not support some of the advanced excel features (but if fine for simple data files).

  9. #9
    Senior Member
    Join Date
    Apr 2004
    Location
    Crewe, England
    Posts
    304
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Write in to Excel file

    Simon,

    You beat me to it. That's what I was going to say.

    To do this you'd need to save the file from Excel as a CSV file and then Import the edited file back into Excel.

    As you say, there are features which won't be supported.

    Also, I don't know what would happen to any formulae during export/import or editing in csv format. I don't know if you have any ideas on this Simon?

    Regards
    Graham

 

 

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 9.38%
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 06:24 PM.

Copyright BetaSoft Inc.