Cancel
Showing results for 
Search instead for 
Did you mean: 

About excel output the time(hh:mm:ss)

Creator
Creator

Hi Guys, 

I have some question of Excel output: Tool Path Time.

Now the problem is the time always output minutes.

I want output the time is (hh:mm:ss),

NX.png

My Excel functions is:

-------------------------------------------------------------------------

=TEXT("${mom_toolpath_time}/864","hh:mm:ss")

-------------------------------------------------------------------------

But it still the same output.

So... how can I do?

 

Thanks in advance,

Taco.

12 REPLIES 12

Re: About excel output the time(hh:mm:ss)

Phenom
Phenom

Guessing here as I have not used excel shop doc templates.

Excel times are decimal fractions of a day.

Try using "time in minutes"/1440 and use excel cell format h:mm:ss

 

at a guess

${mom_toolpath_time}/1440.0

 

 

Re: About excel output the time(hh:mm:ss)

Creator
Creator

Hi Agrivas,

I am wrong in the time output is seconds not minutes, sorry!

and I try your answer, but the excel output can't do the operation.

messageImage_1546566633144.jpg

 

Thanks in advance,

Taco.

Re: About excel output the time(hh:mm:ss)

Phenom
Phenom

 

Maybe this.

 

[expr {$mom_operation_time/86400.0}]

If I get a minute I will have a look at Excel shop doc templates

Re: About excel output the time(hh:mm:ss)

Phenom
Phenom

That does not work.

I dont think excel formatting works here

Looking in the shopdoc_excel.tcl it should be possible to do maths on these values.

 

I am out of ideas on this

 

 

Highlighted

Re: About excel output the time(hh:mm:ss)

Phenom
Phenom

I had another go and got it to work.

I put this in the excel sheet and set format to text (not sure if format matters)

 

 

'=[clock format [expr {round(${mom_toolpath_time}*60)}] -format %H:%M:%S -gmt 1]

Publish htm and run shop doc and it fails.

 

Open html template in text editor, search for mom_toolpath_time 

Remove the line break from middle of above formula

 

Works!

Re: About excel output the time(hh:mm:ss)

Creator
Creator

Hi Agrivas,

I try your code in excel, but have some trouble:

1.jpg

 

Html doc code:

2.jpg

 

The output time is:

3.jpg

 

It's still wrong!!!

And I don't know where the problem is.

 

Thanks in advance,

Taco.

Re: About excel output the time(hh:mm:ss)

Experimenter
Experimenter

Guess ' is the problem.

In Excel you can override format whit ' in the beginning, Excel output Text whatever you write after that character.

Re: About excel output the time(hh:mm:ss)

Phenom
Phenom

I put the leading ' in the excel to stop it raising a formula error

When the file is published to htm it will remove the leading '

 

It looks like you added it back when removing the line break in the formula.

 

 

 

Re: About excel output the time(hh:mm:ss)

Creator
Creator

Hi @CDS and @agrivas,

 

 

But when I move ' in HTM, there is nothing in the output.

4.jpg

 

And attach a video.

(view in My Videos)

 

Thanks in advance,

Taco.

Learn online





Solution Information