Platform
Learn
Community
Support
Sign up
or
Log in
Profile
messages
Messages
logout
Logout
Platform
Home
Downloads
IPP
Licensing
Project Sizing
Beta
Learn
Training
Documentation
Evaluation Guide
Community
Jobs
Home
Forums
Forge
Ideas
Badges
Members
Support
Partner Guide
Resources Library
Opportunities
Account Management
Pre Sales Demos
Sign up
or
Log in
Home
Jobs
Forums
Forge
Ideas
Members
Badges
Dear ,
What would improve your OutSystems Community experience? Let us know by taking this 2-minute survey.
Pick up the survey
Community
›
Forums
›
Technology & Integration
Export to a TXT file
New Post
New Post
Paulo Torres
Posted on 2011-05-18
Paulo Torres
Rank: #1386
Posted on 2011-05-18
Hello people!
In plataform is possible export one table for TXT file??
Regards, Paulo Torres
Nelson Inácio
Posted on 2011-05-18
Nelson Inácio
Rank: #299
Posted on 2011-05-18
Solution
Hi,
There are already functionalities to export entities to Excel.
To export to txt you need to build the file format for example:
For each record in table generate line with this format on text variable
<Value 1>|<Value 2>|<Value 3>.....|<Value n>
Then using the extension binary data, use the function TextToBinaryData and then you can download the file, using the download object in the Service Studio.
Regards,
Nelson Inácio
Solution
Paulo Torres
Posted on 2011-05-18
Paulo Torres
Rank: #1386
Posted on 2011-05-18
Solution
Thanks Nelson.
Is possible to
export
directly
to
TXT
with
the values ??separated by
commas
?
Regards, Paulo Torres
Solution
Miguel 'Kelter' Antunes
Posted on 2011-05-18
Miguel 'Kelter' Antunes
Rank: #4
Posted on 2011-05-18
Solution
Hello Paulo,
there are some ways to do it, but not directly and out of the box... at least i think not.
but take a look on
this
, probably it does what you want, im not sure since i never used it.
let us know more about it.
HTH, regards,
Miguel Antunes
Solution
Paulo Torres
Posted on 2011-05-18
Paulo Torres
Rank: #1386
Posted on 2011-05-18
Solution
Thanks Miguel.
I understand
that
it is not
simple...
Regards, Paulo Torres
Solution
Paulo Tavares
Posted on 2011-05-18
Paulo Tavares
Rank: #97
Posted on 2011-05-18
Solution
Hi Paulo,
Actually, the extension that Miguel showed you makes it really simple. You just have to install it in your server, and call an action. It will convert the Record List to a CSV file - which is, in reality, a text file with comma as a separator.
After that, you just have to have an action with a Download node, with the result of the RecordListToCSV action.
Wasn't that what you were looking for? Have you tried it out?
Regards,
Paulo Tavares
Solution
Paulo Torres
Posted on 2011-05-20
Paulo Torres
Rank: #1386
Posted on 2011-05-20
Solution
is there any
direct way
to
export the table
to
notepad
already
separated
by commas
?
Regards, Paulo Torres
Solution
Justin James
Posted on 2011-05-21
Justin James
Rank: #8
Posted on 2011-05-21
Solution
This isn't hard, just have a Text variable... do you query, For/Each through the results, add to the Text variable as needed. You can then write to a file on disk using the FileSystem extension to put the data into the text file. If you then want to send that file to the user, use the DownloadFile widget, and pass to it the results of calling TextToBinaryData (in the BinaryData extension) on the Text variable.
J.Ja
Solution
Paulo Torres
Posted on 2011-05-23
Paulo Torres
Rank: #1386
Posted on 2011-05-23
Solution
Thanks =)
Do you have any example (E-space or Print Screen)?
Regards, Paulo Torres
Solution
Nelson Inácio
Posted on 2011-05-23
Nelson Inácio
Rank: #299
Posted on 2011-05-23
Solution
Answer to:
"Thanks Nelson.
Is possible to
export
directly
to
TXT
with
the values ??separated by
commas
?
Regards, Paulo Torres"
Yes, it's possible to build a file separated by commas, you can decide the file format, since there are no direct conversion to a text file, you need to build yourself the file format and the functions to write the file, then use the binarydata extension to convert the text to binary data and then use the download widget to get the file.
To read the file the extension CSV has functions to transform the data into a record list.
Regards,
Nelson Inácio
Solution
Justin James
Posted on 2011-05-23
Justin James
Rank: #8
Posted on 2011-05-23
Solution
I don't have any samples offhand, but it should only take you a few minutes to work through it once you get those extensions. I've found that those extensions (BinaryData and FileSystem) are two very important extensions to get familiar with, along with HTTPRequestHandling.
J.Ja
Solution
Login to reply
New Post
Available Forums
Technology & Integration
News and Announcements
Forge Discussions
Meta
Hints and How-To Guides
Usability
Installation Troubleshooting
Personal Environment Troubleshooting
Forum Notifications
Email Digest Settings
Loading...
(hidden) New Badge Popup