Best way to select sheet range from spreadsheet and paste into another application

Hi all,

We have selected a range of data from a spreadsheet using the SheetName.GetSheets(0) function. Please could you advise how we can copy that data and paste into anther application (access / notepad)? Would we use a the select range variable?

Thanks,
Tony

@TRX you can use the Read Range Activity. It will output a DataTable. If you want to see the DataTable contents as a String, you can use the Output DataTable Activity and Type the resulting String into notepad.

Thanks, how would we paste this into an Access table please? The read range activity seems to be erroring out at the moment too. Cheers

@TRX can you give me a couple screenshots? I’m not sure which error it’s throwing you.
Also, I’m not so familiar with Access so I’m not sure I can help with that but if it’s a table, you can just use the Type Into Activity. And if you’re thinking about inserting the data into a table, then you might not want to convert the whole DataTable into a String as in my previous post. You will need to use a For Each Row Activity and put the Type Into Activity inside the For Each Row. The String you will Type Into will look something like row(0).ToString. The index inside the parentheses will change depending on which column of the DataTable you’re trying to type.

Thanks, do we still need to use the output DataTable after the Read Range activity or do we go straight to “For each Row”?

@TRX no you can go straight to For Each Row

ok thanks, would we add the Open application activity into the For Each activity too?

@TRX yes you will need to open Access before you type but I suggest you do it before the For Each Row, because if you include inside the loop then you will open Access every time you loop.