text to excel for GRIMM data
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
dpb
2023 年 9 月 9 日
編集済み: dpb
2023 年 9 月 10 日
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.
回答 (1 件)
Sulaymon Eshkabilov
2023 年 9 月 10 日
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 件のコメント
dpb
2023 年 9 月 10 日
編集済み: dpb
2023 年 9 月 10 日
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...
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!