Extract data from txt to another document

Post Reply
njfosforito
Newbie
Posts: 3
Joined: Wed Dec 18, 2024 6:41 pm

Extract data from txt to another document

Post by njfosforito »

Hello,

I'm completely new to switch and waiting on training. Is it possible to pull information from a database into another? If so what do you think is the best way to process something like this?

it's a txt file I am receiving but I will need to pull specific columns and and or specific cells. Would it make sense to use JS CVS writer App? Does Javascript sound like the best way to use something like this to extract information.

Does jS also give the ability to format specific a column? Meaning if I need a column to include decimals, commas or date format will it alter the data if written correctly?

Thanks I appreciate any info/guidance that you guys can provide. If I am too vauge I can create some samples to show exactly what I mean if visually is more useful.
User avatar
magnussandstrom
Advanced member
Posts: 512
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden
Contact:

Re: Extract data from txt to another document

Post by magnussandstrom »

I think you would need to provide a more specific example for us to be able to offer you some guidance.
jan_suhr
Advanced member
Posts: 687
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Extract data from txt to another document

Post by jan_suhr »

If you have the Switch Scripting module you can easily do this.

With NodeJS in Switch there are all kinds of possibilities with the Scripting Module.

It uses NPM Packages that are available here: https://www.npmjs.com/ as scripting modules that you can adapt to the Switch environment.

The CSV format is useful in this case and there are plenty of NPM packages for that
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
User avatar
tdeschampsBluewest
Member
Posts: 132
Joined: Tue Jun 01, 2021 11:57 am

Re: Extract data from txt to another document

Post by tdeschampsBluewest »

njfosforito wrote: Thu Dec 19, 2024 4:40 pm Hello,

I'm completely new to switch and waiting on training. Is it possible to pull information from a database into another? If so what do you think is the best way to process something like this?

it's a txt file I am receiving but I will need to pull specific columns and and or specific cells. Would it make sense to use JS CVS writer App? Does Javascript sound like the best way to use something like this to extract information.

Does jS also give the ability to format specific a column? Meaning if I need a column to include decimals, commas or date format will it alter the data if written correctly?

Thanks I appreciate any info/guidance that you guys can provide. If I am too vauge I can create some samples to show exactly what I mean if visually is more useful.
Hi, there are several app that can do this (CSV creator to edit a CSV file, CSV pickup to make basic request...).
However they may not be specific for your needs.

As said by other, if you give us more details, we can guide you to one app or another, or a some Npm modules tied for this.
Do you like the Enfocus Apps developed by Bluewest?
Feel free to leave a comment on the Appstore!
njfosforito
Newbie
Posts: 3
Joined: Wed Dec 18, 2024 6:41 pm

Re: Extract data from txt to another document

Post by njfosforito »

magnussandstrom wrote: Fri Dec 20, 2024 9:08 am I think you would need to provide a more specific example for us to be able to offer you some guidance.
Thank you for replying, so I would like extract specific rows. first row to create some form of header and anything following (row two could like to extract column A, B, J, C, and finally D into a new file.
I guess which app would work best of something similar to this
This is how it's provided
This is how it's provided
Screenshot 2024-12-23 at 12.30.17 PM.png (66.05 KiB) Viewed 10099 times
how i would like to extract
Screenshot 2024-12-23 at 12.32.52 PM.png
Screenshot 2024-12-23 at 12.32.52 PM.png (27.26 KiB) Viewed 10099 times
----
Apart from extraction request, I would like to make an additional file separate file, using what the client provided, where the highlighted is formatted. Is there a separate app that can do this as well?
This is how it's provided
This is how it's provided
Screenshot 2024-12-23 at 12.30.17 PM.png (66.05 KiB) Viewed 10099 times
Screenshot 2024-12-23 at 12.44.03 PM.png
Screenshot 2024-12-23 at 12.44.03 PM.png (56.36 KiB) Viewed 10099 times
one column is comma, one is moving decimal by 2 places, date, and zipcode +4

Hopefully this can help
User avatar
magnussandstrom
Advanced member
Posts: 512
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden
Contact:

Re: Extract data from txt to another document

Post by magnussandstrom »

I would use 'Easy Data Transform' to do this in Switch. The first file is a piece of cake. The second file could be a bit more challanging, but I think it is possible with 'Easy Data Transforms' as well.
njfosforito
Newbie
Posts: 3
Joined: Wed Dec 18, 2024 6:41 pm

Re: Extract data from txt to another document

Post by njfosforito »

thank you I will try this out!
Post Reply