Create CSV File with ScreenScraping Results

@Bradley_Mckinnon,
EDIT: Glad you got it working! I’m editing my post to make it clear that what I wrote (in quotes) is not the best way to approach this. :slight_smile: There’s a more direct route. I’ve posted a little example workflow in the post under @andrzej.kniola’s post.

I don’t have any clue what the data is, but please try the attached workflow, modifying it as you need to. I’m shooting in the dark because I don’t know what’s in each row of the table I reference. (If the data doesn’t get passed in correctly, please try removing my assigns for “order”, “timestamp”, “product”, and “gamekey”, to see if the defaults get passed in.)

All this relies on changing the ArrayRow property and not the DataRow property.

You may very well have to change the values I have like “bnetGameKeyTable.Rows(1).Item(1).ToString” to different row and item numbers (I don’t know what’s in there).

If this approach doesn’t work, try something from what’s below, for DataRow instead of ArrayRow:

EDIT: What I described earlier below is too murky. See @aksh1yadav’s post here for a much, much clearer explanation of how to use the DataRow property.

As @palindrome suggested in the post above:

Use assign to add value to specific cell. example: dt.Row(6).Item(6)=value To add blank row in datatable use {} in array row and Datatable as tablename.

So, perhaps the solution is something like this (remember I don’t have access to your data and can’t step through the workflow):

  1. In your last ‘Add data row’, create a blank row first by adding ‘{}’ in the ArrayRow property. That gets you a blank row you can fill in.
  2. Fill the values in for the DataRow object. See @palindromes post, and:
    DataRowCollection.Add Method (System.Data) | Microsoft Learn.

Regards,
burque505

McKinnon2_burque505.xaml (26.6 KB)

1 Like