How to open a csv / text file containing hex data?

asked 2017-11-17 09:24:48 +0100

jrussell88 gravatar image

I would like to open files of the following structure in Calc:

Time [s],Packet ID,MOSI,MISO

9.816897624999999,0,0x00,0x01

9.816989000000000,0,0x00,0x02

9.817080375000000,0,0x00,0x7C

9.817171812500000,0,0x00,0x0E

However I approach it, this is interpreted as hex data, rather than four columns of text data.

I can copy and paste from a text editor; is there a way to import it?

edit retag flag offensive close merge delete

Comments

It's unclear to me what precisely is your expected result. When I import it, it arrives as four columns with first two having numeric data, and last two - strings, like 9,816897625 | 0 | 0x00 | 0x01 - do you need to convert also first two to strings, or maybe last two to numbers? The former is done by right-clicking on column headers in CSV import dialog.

Mike Kaganski gravatar imageMike Kaganski ( 2017-11-17 09:44:05 +0100 )edit

Nope your result is fine with me. At present I've only had a string of interpreted hex data.

What settings achieved that?

jrussell88 gravatar imagejrussell88 ( 2017-11-17 13:39:51 +0100 )edit

I copied your strings to a file (hex.csv), and used "Language: en-US; Separated by: Comma" in CXV import dialog.

Mike Kaganski gravatar imageMike Kaganski ( 2017-11-17 13:49:06 +0100 )edit