Azzera filtri
Azzera filtri

text to excel for GRIMM data

3 visualizzazioni (ultimi 30 giorni)
AMIT SINGH CHANDEL
AMIT SINGH CHANDEL il 18 Giu 2023
I have a following data, of GRIMM instrument (11D model). The output text file is very complex. I want to convert into an excel file so that i can proceed with the visualization of data.
One file is attached here for the reference.
  4 Commenti
AMIT SINGH CHANDEL
AMIT SINGH CHANDEL il 9 Set 2023
Still waiting for an expert to help in this regard
dpb
dpb il 9 Set 2023
Modificato: dpb il 10 Set 2023
You been just sitting since June for somebody else to do your work for you????
You haven't supplied enough specifics about what you really want/need to provide exact code; what, specifically would you expect an output file/dataset to look like?
There's some confusion about the file content itself...what are the header columns and how do they relate to the records without that many values?
There are sets of four 8-valued records, but they're not labelled consistently; what's the difference between upper and lower case C0 and c0 -- or is it just some anomaly/error in the file construction? And, is there any significance to the the trailing ":" vis a vis ";"?
Then, it starts off with a P, K, P, then a different sequence following P; whassup with that? Not to mention what may be a date/time stamp(?) in the P record initially has _23 whereas is 23 in the rest...such anomalies add to the difficulties in parsing, but it's essentially impossible without knowing what it is that are looking at and what is expected.
Basically, in such cases, one has to read the data by record and parse/rearrange it into the desired format
ADDENDUM: I intended to add, if this file is output by some commercial package, see the vendor's website for tools to read the output file. Oftentimes (at least with the major vendors) there is a MATLAB version already. Or, you may have the option to mex a C function.

Accedi per commentare.

Risposte (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov il 10 Set 2023
There are a few good MATLAB functions that can be employed to import your data into MATLAB and then export into MS Excel (.xls, xlsx or .csv) format.
For data import: readtable(), dlmread(), textscan(), etc.
For data export: writetable(), writematrix(), xlswrite(), etc.
  2 Commenti
dpb
dpb il 10 Set 2023
Modificato: dpb il 10 Set 2023
The problem here isn't the reading, it's the parsing of what has been read to make something useful out of it to write...and there are too many imponderables w/o more input from the OP as to what stuff really is and how/what intends/needs to do with it to take time first...
AMIT SINGH CHANDEL
AMIT SINGH CHANDEL il 11 Set 2023
Thank you, I got the way to arrange the data in desired manner.

Accedi per commentare.

Prodotti


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by