Bug 145795 - Conversion error opening text file of HEX strings
Summary: Conversion error opening text file of HEX strings
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.2.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-20 15:09 UTC by John Everest
Modified: 2021-11-20 19:32 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example file of text (325 bytes, text/csv)
2021-11-20 15:09 UTC, John Everest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Everest 2021-11-20 15:09:23 UTC
Created attachment 176377 [details]
Example file of text

FILEOPEN
Where the file contains lines of  ASCII HEX VALUES and there is one "E" in a string of numeric characters, the whole line is converted to a floating point number even if the format has been specified as TEXT.

File is attached

Result in LibreOffice Calc :-
27F92824037B271028240380
27102824038227102823037D
27102823037A27102823037B
27102822037C271028220379
27102821037A27112821037B
27102820037E271028210381
27F52821037D271028200379
2.71028200379271E+023
2710281F03782710281F0378
2710281F03792710281E037A
2712281D037A2710281D0379
270E281E037A2710281D0378
2710281D03772710281D0375
Comment 1 V Stuart Foote 2021-11-20 19:30:04 UTC
Can not confirm
Version: 7.2.2.2 (x64) / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

When I open the attached CSV, I select the column holding the HEX string and assign it a type of 'TEXT'

All cells of the column are brought in as TEXT, none those with hex E are converted to some strange Exponential numeric notation.
Comment 2 V Stuart Foote 2021-11-20 19:32:28 UTC
It will only corrupt if you do not correctly change the column type in the CSV import dialog and leave it as 'Standard'.

Correctly selecting the column and applying the import type will import the HEX values as text.