title: Java Excel API JXL - reading cell formated as time
body: <p>I'm using Java Excel API to read data from Excels sheets in my Android project. I have some columns formated as time like this:
  <img src="https://i.stack.imgur.com/5ehSu.png" alt="Time format"></p>
  
  <p>At first I tried read this cell using that code:</p>
  
  <pre><code>String cellContent = cell.getContents();
  </code></pre>
  
  <p>But as result I got content without hours eg :59:59. After that I tried get this time as seconds. I noticed that when cell data is get as DateCell, Date contents object has negative timestamp. I did some trick and I found value of timestamp for 0:00:00. I set variable with this value as positive (2209161600000L). Now I just add this variable to negative timestamp from cell and devide result by 1000 (milliseconds in second). Everything is fine until 23:59:59. Values above have extra 24 h (24:00:00 is reading as 48:00:00). I saw that Excel keeps this values in different ways.</p>
  
  <p><img src="https://i.stack.imgur.com/kcvB7.png" alt="23:59:59 time cell value">
  <img src="https://i.stack.imgur.com/UAOzO.png" alt="24:00:00 time cell value"></p>
  
  <p>I can just subtract this 24h but it isnt elegant solution. I want to get content as #:##:## string (which I prefer) or as seconds. Is there any good solution for this issue?</p>