Main Page | Report this Page
Computers Forum Index  »  Computer - Databases - Paradox  »  Import from Excel .xls problem...
Page 2 of 2    Goto page Previous  1, 2

Import from Excel .xls problem...

Author Message
Tony McGuire...
Posted: Thu Mar 05, 2009 2:20 am
Guest
Jim Moseley wrote:

dt.setDestFieldNamesFromFirst(True)

Using this, I think creating a new table is forced since the field names would
only be set when a new table is created. Or am I off base?


Tony
 
Jim Moseley...
Posted: Thu Mar 05, 2009 2:27 am
Guest
Tony,

Quote:
dt.setDestFieldNamesFromFirst(True)

Using this, I think creating a new table is forced since the field names
would
only be set when a new table is created. Or am I off base?

I'm not sure. I actually commented out this line in one test to see what
would happen, and ended up wiping out the field names (to 'Field 001' I think).

I assumed that since this created a new table, the 'false' value would also.
Which kind of makes sense - you're telling it what field names to create
- it doesn't match them based on their name (I think). Though, I'm not 100%
sure! ;)

Jim Moseley
 
Liz McGuire...
Posted: Thu Mar 05, 2009 4:14 am
Guest
If it gave you that error AND imported what looked like the correct data,
then I would guess that whoever filled out the spreadsheet was copying and
pasting and there's a tab or hard return in front of that H. (Or something
along those lines.)

My only other comment, though it isn't really in reply to this, is that Bertil's
bug list has the exact error message the OP was getting, so I would focus
on that...

FWIW,

Liz


"Jim Moseley" <jmose at (no spam) mapson.attglobal.net> wrote:
Quote:

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.
 
Liz McGuire...
Posted: Thu Mar 05, 2009 4:16 am
Guest
You don't happen to have the Excel file open on your computer while you're
trying to import it, do you?

Liz


"Toby Sleigh" <toby.sleigh at (no spam) gmail.com> wrote:
Quote:

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?
 
Toby Sleigh...
Posted: Thu Mar 05, 2009 1:26 pm
Guest
"Liz McGuire" <liz at (no spam) paradoxcommunity.com> wrote in message
news:49aefdd4$1 at (no spam) pnews.thedbcommunity.com...
Quote:

You don't happen to have the Excel file open on your computer while you're
trying to import it, do you?

Liz

No.
 
Anders...
Posted: Thu Mar 05, 2009 2:29 pm
Guest
Quote:
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
 
...
Posted: Wed Mar 11, 2009 10:14 am
Guest
On 5 mar, 09:29, "Anders" <and... at (no spam) jREMOVEjonssondata.se> wrote:
Quote:
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 -

HI, sorry by my english.

i had the same problem but i repair wordperfect office 11 and the
problem was missing.
 
Toby Sleigh...
Posted: Tue Mar 24, 2009 12:24 am
Guest
<COTAINA at (no spam) terra.es> wrote in message
news:85b3505e-1701-45b9-936b-f87dee508cd2 at (no spam) q9g2000yqc.googlegroups.com...
Quote:

- 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.

Many thanks

Toby
 
 
Page 2 of 2    Goto page Previous  1, 2
All times are GMT
The time now is Sun Nov 29, 2009 11:23 am