Thank you for the reply.

I am switching to the usermodel to see what I see, but here is a snippet of
what I tried to do 
in the eventmodel (based on the EventExample). I tested against an Excel
table with date formatted
values. Unfortunately, I was not able to detect the value was date
formatted:

public class EventExample implements HSSFListener {

  private ArrayList sheetNames = new ArrayList (15);
  private ArrayList formatRecords = new ArrayList (30);
  private ArrayList extendedFormatRecords = new ArrayList (100);
  
  public void processRecord (Record record) {
    switch (record.getSid ()) {

      case NumberRecord.sid:
        NumberRecord numrec = (NumberRecord) record;
        ExtendedFormatRecord extendedFormatRecord = 
          (ExtendedFormatRecord) extendedFormatRecords.get
(numrec.getXFIndex ());
        FormatRecord formatRecord = (FormatRecord) 
          formatRecords.get (extendedFormatRecord.getFormatIndex ());
        log.debug ("number format " + 
           HSSFDateUtil.isInternalDateFormat
(extendedFormatRecord.getFormatIndex ()) + 
           " " + formatRecord.getFormatString ());
        break;

      case ExtendedFormatRecord.sid:
        ExtendedFormatRecord efr = (ExtendedFormatRecord) record;
        extendedFormatRecords.add (efr);
        break;

      case FormatRecord.sid:
        FormatRecord fr = (FormatRecord) record;
        formatRecords.add (fr);
        break;
    }
  }
  

Reply via email to