Login   Register  
PHP Classes
elePHPant
Icontem

automatic date detection

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Simple XLSX  >  All threads  >  automatic date detection  >  (Un) Subscribe thread alerts  
Subject:automatic date detection
Summary:Automationc detection of date columns
Messages:19
Author:abhishek rana
Date:2013-03-11 08:40:34
Update:2013-03-17 04:30:19
 
  1 - 10   11 - 19  

  1. automatic date detection   Reply   Report abuse  
Picture of abhishek rana
abhishek rana
2013-03-11 08:40:35
Ok I saw this thread
http://www.phpclasses.org/discuss/package/6279/thread/9/

but what I want to know is I may not know which columns are date fields , is there any way this can be done automatically, or any way to find the type of column

  2. Re: automatic date detection   Reply   Report abuse  
Picture of mahesh patel
mahesh patel
2013-03-11 22:10:20 - In reply to message 1 from abhishek rana
I would like to bump this thread. It would be nice to automatically output the date field in a spreadsheet as a lot of spreadsheets will include date data rather than needed to figure out which row or column contains the data, and then using a unixstamp or PHP date function.

Is there a plan to develop this?
Otherwise this is a nice project. Thanks,
-Kavel

  3. Re: automatic date detection   Reply   Report abuse  
Picture of Sergey Shuchkin
Sergey Shuchkin
2013-03-12 20:16:57 - In reply to message 2 from mahesh patel
check 0.6.3 version

print_r( $xlsx->rowsEx() ); // there type = 'd' for dates now

  4. Re: automatic date detection   Reply   Report abuse  
Picture of abhishek rana
abhishek rana
2013-03-13 07:38:12 - In reply to message 3 from Sergey Shuchkin
type index for date column is still empty
rows ex print out for a sample file is
Array
(
[0] => Array
(
[0] => Array
(
[type] => s
[name] => A1
[value] => Numbers
[href] =>
[f] =>
[format] => General
)

[1] => Array
(
[type] => s
[name] => B1
[value] => Message
[href] =>
[f] =>
[format] => General
)

[2] => Array
(
[type] => s
[name] => C1
[value] => Date
[href] =>
[f] =>
[format] =>
)

)

[1] => Array
(
[0] => Array
(
[type] =>
[name] => A2
[value] => 9591283838
[href] =>
[f] =>
[format] => General
)

[1] => Array
(
[type] => s
[name] => B2
[value] => Dear Anbu testing
[href] =>
[f] =>
[format] =>
)

[2] => Array
(
[type] =>
[name] => C2
[value] => 41339
[href] =>
[f] =>
[format] =>
)

)

[2] => Array
(
[0] => Array
(
[type] =>
[name] => A3
[value] => 7760030193
[href] =>
[f] =>
[format] => General
)

[1] => Array
(
[type] => s
[name] => B3
[value] => Dear Niranjan
[href] =>
[f] =>
[format] =>
)

[2] => Array
(
[type] =>
[name] => C3
[value] => 41339
[href] =>
[f] =>
[format] =>
)

)

)

column C2 and C3 are date,, but type is blank

  5. Re: automatic date detection   Reply   Report abuse  
Picture of abhishek rana
abhishek rana
2013-03-13 08:03:35 - In reply to message 3 from Sergey Shuchkin
hey sergey thanks for replying ,
here is the row output for the same sample file

SimpleXMLElement Object
(
[@attributes] => Array
(
[r] => 1
[spans] => 1:3
)

[c] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[r] => A1
[s] => 2
[t] => s
)

[v] => 0
)

[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[r] => B1
[s] => 3
[t] => s
)

[v] => 1
)

[2] => SimpleXMLElement Object
(
[@attributes] => Array
(
[r] => C1
[s] => 5
[t] => s
)

[v] => 4
)

)

)
SimpleXMLElement Object
(
[@attributes] => Array
(
[r] => 2
[spans] => 1:3
)

[c] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[r] => A2
[s] => 1
)

[v] => 9591283838
)

[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[r] => B2
[t] => s
)

[v] => 2
)

[2] => SimpleXMLElement Object
(
[@attributes] => Array
(
[r] => C2
[s] => 6
)

[v] => 41339
)

)

)
SimpleXMLElement Object
(
[@attributes] => Array
(
[r] => 3
[spans] => 1:3
)

[c] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[r] => A3
[s] => 1
)

[v] => 7760030193
)

[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[r] => B3
[t] => s
)

[v] => 3
)

[2] => SimpleXMLElement Object
(
[@attributes] => Array
(
[r] => C3
[s] => 6
)

[v] => 41339
)

)

)

  6. Re: automatic date detection   Reply   Report abuse  
Picture of Sergey Shuchkin
Sergey Shuchkin
2013-03-13 08:09:05 - In reply to message 4 from abhishek rana
hmmm

send me your xlsx to sergey.shuchkin[ Who let the dogs out? ]gmail.com

  7. Re: automatic date detection   Reply   Report abuse  
Picture of abhishek rana
abhishek rana
2013-03-13 08:20:34 - In reply to message 6 from Sergey Shuchkin
done its from rana_abhi9018@yahoo.co.in

  8. Re: automatic date detection   Reply   Report abuse  
Picture of Sergey Shuchkin
Sergey Shuchkin
2013-03-13 09:59:51 - In reply to message 7 from abhishek rana
try 0.6.4

  9. Re: automatic date detection   Reply   Report abuse  
Picture of abhishek rana
abhishek rana
2013-03-13 11:23:47 - In reply to message 8 from Sergey Shuchkin
yo its working , thanks man

  10. Re: automatic date detection   Reply   Report abuse  
Picture of mahesh patel
mahesh patel
2013-03-14 22:01:08 - In reply to message 9 from abhishek rana
Automatic date detection still fails on my spreadsheet. I still get columns with 41090.

 
  1 - 10   11 - 19