Bug 170451 - Calc cannot recognize the time in format hh24:mi:ss when pasting or changing the cell format
Summary: Calc cannot recognize the time in format hh24:mi:ss when pasting or changing ...
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.8.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-23 12:41 UTC by levanchuk@gmail.com
Modified: 2026-01-27 08:28 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description levanchuk@gmail.com 2026-01-23 12:41:28 UTC
Description:
If you insert a single value, everything is fine, but the range is not. 
08:35:37
07:47:58
08:08:51
It inserts as text. If you force the cell type to time, but force ' is added and nothing changes.
If you set the date column format when inserting, some cells are reformatted to look like xx.xx.xx from xx:xx:xx


Steps to Reproduce:
1.Select:
08:35:37
07:47:58
08:08:51
2. Insert into calc


Actual Results:
Insert as time

Expected Results:
Insert as text or transform some lines in wrong format


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.8.4.2 (X86_64) / LibreOffice Community
Build ID: 580(Build:2)
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb)
Locale: be-BY (be_BY.UTF-8@latin); UI: be-BY
Ubuntu package version: 4:25.8.4~rc2-0ubuntu0.24.04.1~lo1
Calc: threaded
Comment 1 m_a_riosv 2026-01-23 22:41:35 UTC
If you want text, use the right arrow of the paste icon, or Menu>Edit>Paste special, past as unformatted text, marking the column as text.

But I'm unsure to understand the question.
Comment 2 raal 2026-01-24 11:01:48 UTC
Menu>Edit > Paste special > Hypertext markup Language (HTML) > check "Detect special numbers"
Is it what you want?
Comment 3 levanchuk@gmail.com 2026-01-26 07:30:33 UTC
Raal this method works. 
Not obvious but working.
Thank you.
Comment 4 levanchuk@gmail.com 2026-01-26 07:34:08 UTC
(In reply to m_a_riosv from comment #1)
> If you want text, use the right arrow of the paste icon, or Menu>Edit>Paste
> special, past as unformatted text, marking the column as text.
> 
> But I'm unsure to understand the question.

If you insert a single value, it is inserted as time. If you insert a range, it is inserted as text. And I would like it to be the same as for a single value - time.
Your method does not work
Comment 5 levanchuk@gmail.com 2026-01-26 09:07:26 UTC
(In reply to raal from comment #2)
> Menu>Edit > Paste special > Hypertext markup Language (HTML) > check "Detect
> special numbers"
> Is it what you want?

Hypertext markup Language (HTML)
Unfortunately, it is only available if you copy from HTML.
Comment 6 ady 2026-01-26 11:21:02 UTC
IIUC, you are trying to copy several lines of the form "hh:mm:ss" from a text, and paste them on a Calc spreadsheet at once.

Whichever the result you get in Calc, it depends on the way the original data is being pasted in Calc. When you attempt to paste the data, do you see the "Text Import" dialog? Or, is the data being pasted directly without any dialog of any sort?

If you do see the Import Text dialog, which settings / options are you selecting?

The reason for these questions is because, for anyone to be able to replicate the issue, we need those details. Please try to clarify the procedure and which options are you selecting – perhaps with a clear screenshot of the Import Text dialog, if that is what you are using.

ATM, this sounds more an issue for <https://ask.libreoffice.org> rather than a bug report.
Comment 7 levanchuk@gmail.com 2026-01-26 12:32:16 UTC
I think you're right - thanks to Raal, the insertion method has been found and it doesn't look like a bug, despite the fact that when inserting one value everything is fine, but when inserting several you have to use the import dialog with personal settings.

My report is not entirely appropriate and may be deleted.
Comment 8 ady 2026-01-27 08:28:49 UTC
(In reply to levanchuk@gmail.com from comment #7)
> the insertion method has been found

FWIW, using a plain text editor as source of the data, I can copy several lines of text in the format of "hh:mm:ss" and paste (simple ctrl+v) that into Calc (LO Dev 26.8a) correctly, and the resulting cells are automatically formatted by Calc as time values. The result does depend on the options I select in the Text Import dialog.

IOW, you are not restricted to having the data in html; simple text should be fine too.