Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy one row with computed fields to excel

Status
Not open for further replies.

furei1976

Programmer
Aug 1, 2011
24
US
Hi All,

Can someone please advise me on how to copy one row with computed fields in a datawindow to excel?
I have tried rowscopy but it seems it did not work.
my code:
lds_extract.Rowscopy(1, lds_extract.RowCount(), Primary!, dw_1, 1, Primary!)

dw_1.saveas(fn,excel5!,true)

Please help.

thanks,
furei
 
the rowscopy does not work. the saveas will work but of course it will copy the entire datawindow content.
 
This code you provided:
lds_extract.Rowscopy(1, lds_extract.RowCount(), Primary!, dw_1, 1, Primary!)
copies all rows from lds_extract to dw_1. I assume you have already filtered the data in lds_extract prior to the rowscopy so that it only contains one row, correct? Also, the datawindow objects for both lds_extract and dw_1 are the same, correct?

Matt


"Nature forges everything on the anvil of time"
 
I did not do any filtering, I don't know what to filter. I am not that familiar with other built-in functions in PB. I am not that advanced user of PB.
I also tried OLE suggestion from Sybase it copies all the rows but not the computed fields.

Please suggest.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top