Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.paradox    |    To crash or not to crash, asks Borland    |    9,834 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 9,639 of 9,834    |
|    Jim Moseley to All    |
|    Re: Import from Excel .xls problem    |
|    04 Mar 09 12:43:44    |
   
   From: jmose@mapson.attglobal.net   
      
   Toby,   
      
   Trying your code with the attached spreadsheet & table worked, but I got   
   errors. For every column in the first record, I got 'Invalid Character.:   
   "H"EWLETT PACKARD OFFI' etc. It imported the data fine though.   
      
   One thing I noticed is that it always deletes the target table and recreates   
   it based on the import. So, does your initial error point to the table being   
   in use somewhere?   
      
   BTW, here's the exact code I used (with everything in C:\Temp instead):   
      
   method run(var eventInfo Event)   
   var dt DataTransfer endvar   
   try   
    dt.setSource("C:\\temp\\Feb09.xls")   
    dt.setDest ("C:\\temp\\Feb09Input2.db")   
    dt.setDestFieldNamesFromFirst(True)   
    dt.setProblems ( True )   
    dt.getSourceRange()   
    dt.transferData ( )   
   onFail   
    errorShow("1")   
   endTry   
   errorShow("2")   
   endMethod   
      
   HTH,   
   Jim Moseley   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca