• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 699
  • Last Modified:

How to export a datawindow into a text file.

my sole purpose is to get the data from a report datawindow by exporting it into a text file so that i can cut and paste it in an excel worksheet. i ve tried the "print to file" option in the w_print window but the file that its generating is garbage. i hope you can help me on this. im also open for a suggestion.
0
arnelignacio
Asked:
arnelignacio
1 Solution
 
SylvainPouliotCommented:
dw_1.saveas()


Look at the help file...there is even an Excel saveas datatype...

There's also the function dw_1.SaveAsAscii()
0
 
arnelignacioAuthor Commented:
thanks for your swift reply, but when i tried that its generating a raw data. what i want is the same presentation as the report data window including the columns with formula. i have read 1 post about the data store? is this applicable?
0
 
BhattiCommented:
You can also save the dta direct in excel.

dw_1.SaveAs("path_with_filename", EXCEL!, TRUE)

You can also open a cold link and transfer data direct to excel.

See in Help SetRemote() function.


Please let us know how you want to save data in file, as excel or text.


Best regards

Bhatti
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
arnelignacioAuthor Commented:
Preferably i want it in excel, because that is what our accounting people are using. i want to capture the exact presentation as my report data window. what they are doing right now is printing the data window and then encoding the figures in their excel files. example of which is our Daily Sales Report which includes the sales of our seven stores. so instead of entering it one by one. they will just copy the file and paste it in their's.  this reduces the error of keying the wrong figures in their report. the saveas() function only gives me the raw data. what i need is the processed one. that is why i trying the "print to file" option. but its giving me garbage. what am i doing wrong?
0
 
SylvainPouliotCommented:
You doing nothing wrong... The Print To file will give you a binary file...but it is not meant to be use in Excel...

Did you try to save as an HTML page or SaveAsAscii()
0
 
bendepCommented:
in PB9 you're able to export (saveas) XML (layout as well as data). From there you can go anyway you like.
0
 
arnelignacioAuthor Commented:
a million thanks to you!!!! the saveasAscii() did work!
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now