> Le 13 déc. 2019 à 00:54, Randy Engle via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> Kirk,
> 
> Rob's plugin + below code should get you what you need:

Interesting code, thank you… 
I bought this plugin recently, very good choice. 

Speaking about it, I had to distinguish between "true" numbers and dates. As a 
date is a number in excel, the solution I've found is to read cell's format, if 
it's a date one I deduce it's a date. Like this:

 $value_r:=xlSheetGetCellNumber ($sheet_l;$row_l;$col_l)
 $refFormat_l:=xlSheetGetCellFormat ($sheet_l;$row_l;$col_l)
 $numFormat_l:=xlFormatGetNumFormat ($refFormat_l)
 $isDate_b:=True
 Case of 
  : ($numFormat_l=xlNumFormat_Date)
  : ($numFormat_l=xlNumFormat_Custom_D_Mon_YY)
  : ($numFormat_l=xlNumFormat_Custom_D_Mon)
  : ($numFormat_l=xlNumFormat_Custom_Mon_YY)
  : ($numFormat_l=xlNumFormat_Custom_HMM_AM)
  : ($numFormat_l=xlNumFormat_Custom_HMMSS_AM)
  : ($numFormat_l=xlNumFormat_Custom_HMM)
  : ($numFormat_l=xlNumFormat_Custom_HMMSS)
  : ($numFormat_l=xlNumFormat_Custom_MDYYYY_HMM)
  Else 
   $isDate_b:=False
 End case 

As I'm using Rob's plugin constants, I may miss some dates if the sheet uses 
custom date formats. 

Any idea? 

-- 
Arnaud de Montard 





**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to