I have text files from a data logger in a format like this
hh:mm, Data, Data
which I need to import into Excel.
I canβt understand for life how to get Excel to import hh: mm time as (24-hour format) instead of text. Is it possible? If not, is there any direct way to convert a hh: mm text column to an Excel time format? (I know that I can write a transformation formula, but should there be something inline already correct?)
Excel 2008 on OS X
Not sure if there is a good way to do this with a button, but
=TIMEVALUE(A1)
A1 - , .
hh: mm, .
A B C D 22:15 =LEFT(A1,2) =RIGHT(A1,2) =TIME(B2,C1,0)
, , - ( A) ( B) ( C) TIME .
:
=TIME(LEFT(A1,2),RIGHT(A1,2),0)
, FROM TEXT.
, 3 3 "", , , 0.5 12:00.
0.5
12:00
, Time.txt :
Time.txt
22:13 09:25 12:20
I would like to read them on an excel sheet and place them in the range from A1 to A3 and format them as hh:mm:ss. This code shows how this can be achieved:
hh:mm:ss
(Note: you need to add a link to Microsoft Scripting Runtimeto make this work. In the VB editor: Tools > Links > Microsoft Scripting Duration )
Microsoft Scripting Runtime
Sub GetTimesFromFile() Dim oFSO As New Scripting.FileSystemObject Dim targetFile As Object Set targetFile = oFSO.OpenTextFile("C:\Time.txt") //Change for your file path as appropriate Dim cellCount As Long cellCount = 1 Do Until targetFile.AtEndOfStream Cells(cellCount, 1) = targetFile.ReadLine Cells(cellCount, 1).NumberFormat = "hh:mm:ss" //Time format I want cellCount = cellCount + 1 Loop End Sub
Source: https://habr.com/ru/post/1780926/More articles:jQuery: how to map all elements to a specific class that follow an element? - jqueryC # how to handle return type exception of GUID? - c #Diff Visualization Algorithm - algorithmC / C ++ library as an FTP server - c ++Linq for xml descendants - c #Cannot use Ctrl + A and Ctrl + E (bash keybindings) on Terminal.app OSX - bashDashcode distinguishes between iPad and iPhone Browser - safariC ++ + OpenCV = Access to read access violations 0x02176000 - c ++How to get DashCode webapp to use Safari Mobile layout on iPhone, but Safari location on iPad - safariUnderline text in WPF - .netAll Articles