How to set a cell to have duration
type? #2848
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#2848
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello
sheetjs
.First of all, thanks for your excellent work.
Back in time, there was clear documentation of how to set the type of cell. This was here (old documentation), well there is no such clear definition anymore. Or please provide a link.
Anyway, according to the old documentation, it is not possible to define as a type of cell the "duration" type. Do we have an improvement about this? Or any other way to it?
Thank you in advance.
The linked part was moved to https://docs.sheetjs.com/docs/csf/cell#data-types
Durations are specified by using a numeric cell (type
n
) with a number format that includes an absolute time token ([h]
or[hh]
for hours,[m]
or[mm]
for minutes,[s]
or[ss]
for seconds). The cell value is interpreted as an integer number of days.For example: https://jsfiddle.net/w8t6qgLy/
Please let us know how the documentation can be improved (what should be mentioned and where it should be added).
If you are coming from LibreOffice or Numbers, note that the applications and native formats (ODS/FODS and NUMBERS respectively) support more types of durations. They do not have exact equivalents, although the parsers try to determine the correct formatted value.
PS: doing a quick search, the quoted lines never were in the documentation.
Thanks for your super fast response! Will have a look shortly.
The quoted text is mine.
It works! Thanks!