![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||
| |||
|
|
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. |
#22
| |||
| |||
|
|
I finally had the idea to try the Excel import on another PC. It all works as expected. hooraay. But what on earth on my PC can be causing this problem? |
#23
| |||
| |||
|
|
You don't happen to have the Excel file open on your computer while you're trying to import it, do you? Liz No. |
#24
| |||
| |||
|
|
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 |
#25
| |||
| |||
|
|
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 I tried exactly the same and it did NOT work! I get an error "Could not read from file" I tried another Excel file and got the same - I thought I had been using this w/o problem before but maybe my memory is wrong. I will check some more. Anders- Ocultar texto de la cita - - Mostrar texto de la cita - |
#26
| |||
| |||
|
|
- Mostrar texto de la cita - HI, sorry by my english. i had the same problem but i repair wordperfect office 11 and the problem was missing. Don't worry about your English, your suggestion worked for me. |
![]() |
| Thread Tools | |
| Display Modes | |
| |