The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 Import data from a structured text file

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
AKazak Posted - 10/04/2023 : 02:57:59 AM
OriginPro 2023b (64-bit) SR1 10.0.5.157
Windows 10 Pro for Workstations 22H2 19045.3086

Greetings!

I have many txt structured files (see an example attached) with the data to imported to Origin for further analysis.
What is the best was of parsing this type of files?

Thank you.

https://my.originlab.com/ftp/forum_and_kbase/Images/Sample.txt

---
Andrey
20   L A T E S T    R E P L I E S    (Newest First)
Sam Fang Posted - 10/09/2024 : 09:05:01 AM
Hi Andrey,

Thanks for your data files.

I tried your four .gdr files. And all can work well.

Did you fail to import them?

Thanks.

Sam
OriginLab Technical Services
AKazak Posted - 09/24/2024 : 03:44:25 AM
quote:
Originally posted by minimax

Hi Andrey,

When you have time, you may share us more sample files?



Done!
Please see "\incoming\GDR 2024-09-24_.zip".

---
Andrey
AKazak Posted - 03/06/2024 : 05:15:56 AM
quote:
Originally posted by minimax

Hi Andrey,

When you have time, you may share us more sample files?



Greetings!

The real name of the format is YAML format (“JSON with comments“).

---
Andrey
minimax Posted - 12/19/2023 : 02:21:02 AM
Hi Andrey,

When you have time, you may share us more sample files?
Sam Fang Posted - 11/06/2023 : 02:50:34 AM
Hi Andrey,

You can click Send File to Tech support button on the top right of the forum page. And it will show you how to upload large files to our ftp.

quote:
Originally posted by AKazak
Dear Sam,

I tested the version 2, but it seems still unable to read the whole file.

Can share a link to secured file exchange, so I could share more examples, please?

---
Andrey



Thanks.

Sam
OriginLab Technical Services
AKazak Posted - 11/05/2023 : 01:45:40 AM
quote:
Originally posted by Sam Fang

Hi Andrey,

I updated the app. It can now support file names with "S*.txt" or "*.gdr". You can test it.
https://my.originlab.com/ftp/forum_and_kbase/Images/StrMapDC.zip

quote:
Originally posted by AKazak

Can you share an update to test, please?

---
Andrey



Thanks.

Sam
OriginLab Technical Services



Dear Sam,

I tested the version 2, but it seems still unable to read the whole file.

Can share a link to secured file exchange, so I could share more examples, please?

---
Andrey
Sam Fang Posted - 11/03/2023 : 03:08:49 AM
Hi Andrey,

I updated the app. It can now support file names with "S*.txt" or "*.gdr". You can test it.
https://my.originlab.com/ftp/forum_and_kbase/Images/StrMapDC.zip

quote:
Originally posted by AKazak

Can you share an update to test, please?

---
Andrey



Thanks.

Sam
OriginLab Technical Services
AKazak Posted - 11/02/2023 : 12:23:26 PM
quote:
Originally posted by snowli

Hi Andrey,

Yiming is on vacation. I will ask some other colleague to take a look.

Thanks, Snow



Dear Snow,

No worries.
I will be waiting until Yiming returns back from his vacation.

---
Andrey
snowli Posted - 11/02/2023 : 11:49:48 AM
Hi Andrey,

Yiming is on vacation. I will ask some other colleague to take a look.

Thanks, Snow
AKazak Posted - 11/02/2023 : 10:01:47 AM
Can you share an update to test, please?

---
Andrey
AKazak Posted - 10/29/2023 : 06:52:56 AM
quote:
Originally posted by YimingChen

Please try the attached string map connector.opx. It may ask to install the PyYAML module and need to restart Origin. Thanks.



https://my.originlab.com/ftp/forum_and_kbase/Images/String%20Map%20Connector.zip

James



Dear James,

I tried, but getting:



Can you add "*.gdr" to the import filter list, please?

---
Andrey
YimingChen Posted - 10/26/2023 : 11:40:25 AM
Please try the attached string map connector.opx. It may ask to install the PyYAML module and need to restart Origin. Thanks.



https://my.originlab.com/ftp/forum_and_kbase/Images/String%20Map%20Connector.zip

James
AKazak Posted - 10/26/2023 : 01:31:29 AM
quote:
Originally posted by YimingChen

I couldn't find any Python library named stringmap. If it exists, we could explore creating a data connector using Python.

James



Dear James,

Please see the library attached.
Can you consider making a relevant data connector for this, please? https://my.originlab.com/ftp/forum_and_kbase/Images/stringmap.py.txt

---
Andrey
YimingChen Posted - 10/23/2023 : 3:17:25 PM
I couldn't find any Python library named stringmap. If it exists, we could explore creating a data connector using Python.

James

quote:
Originally posted by AKazak

The developer of the software producing the target JSON-like files responded that they use Python stringmap library to generate.

Do you mean that I could use Data Connector Browser to parse these files?

---
Andrey

AKazak Posted - 10/23/2023 : 08:35:03 AM
The developer of the software producing the target JSON-like files responded that they use Python stringmap library to generate.

Do you mean that I could use Data Connector Browser to parse these files?

---
Andrey
aplotnikov Posted - 10/04/2023 : 7:02:47 PM

https://my.originlab.com/ftp/forum_and_kbase/Images/Sample_json.txt
AKazak Posted - 10/04/2023 : 11:37:51 AM
This is not JSON format, but output of a proprietary software.
Thus I cannot change the generator...

---
Andrey
aplotnikov Posted - 10/04/2023 : 10:56:17 AM
It looks like corrupted standard JSON format. But the topic starter can use and modify any available source code for JSON parser to consider possible data errors.
The solution consisting in the improvement of the JSON generator seems less time consuming. However, I am not sure, whether it is possible in this particular case.
YimingChen Posted - 10/04/2023 : 09:18:49 AM
The data file doesn't adhere to the standard JSON format, for example, there are missing commas at the end of some long strings. Would it be possible to fix that?

James
aplotnikov Posted - 10/04/2023 : 08:36:48 AM
https://www.json.org/json-en.html
https://www.originlab.com/fileExchange/details.aspx?fid=505

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000