SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Sep 2004
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to delete data in the cells of excel sheet dynamically

    Hi,
    My requirement is to add 4 rows of data in the excel sheets and the later clear that data and place a different set of data in the same cells. I have used ddt_set_val_by_row(table,row,parameter,"");
    This is successfully deleting the data, but the ddt_row_count() is still 4.I have used ddt_close(table); before opening it again and finding rowcount. Still the problem persists. Is there any way to clear the excel sheet through script and make rowcount zero.

  2. #2
    Moderator JakeBrake's Avatar
    Join Date
    Dec 2000
    Location
    St. Louis - Year 2025
    Posts
    15,609
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to delete data in the cells of excel sheet dynamically

    Are you using ddt_save?

    Why are you having to do this process? I ask since I have never seen the table used this way - and am wondering if there might be a better solution for you?

  3. #3
    Moderator
    Join Date
    Mar 2000
    Location
    Orange County, CA
    Posts
    3,187
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to delete data in the cells of excel sheet dynamically

    That is one of the frustrating things with WinRunner and .xls files.

    If you delete the data contained in the rows, WinRunner still detectd the rows. Only by manually editing and deleting the entire row and not just the contents does WinRunner recognize the rows being deleted.

    The only way I can see to get around it is to add in statmenets to act only if the values are not NULL, that is , unless NULL is a valid condition.


    Are these 4 rows the only information you are puling from the xls file? if it s, it seems a bit overkill putting this info into a sheet just to pull it out later - an array might prove easier to work with?
    Insanity: doing the same thing over and over again and expecting different results

  4. #4
    Junior Member
    Join Date
    Aug 2004
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to delete data in the cells of excel sheet dynamically

    I've gotten around this by creating a blank table and exporting it to the table I want to clear.

    ddt_open (target_table.xls);
    ddt_export (blank_table.xls, target_table.xls);

  5. #5
    Senior Member
    Join Date
    Jun 2004
    Location
    New Zealand
    Posts
    223
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: How to delete data in the cells of excel sheet dynamically

    The number of rows in an XL sheet is controlled by XL. Some last row or end row thingy (object, property method whatever)

    WR DDT functions do not work on XL at all (apart from Open and Save which provide the WR DDT version or put it back)

    You might like to experiment with the good old dos system commands and copy over the top or delete. Very Quick Very Effective.

 

 

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 09:57 PM.

Copyright BetaSoft Inc.