 |
|
| Computers Forum Index » Computer - Databases - Paradox » Import from Excel .xls problem... |
|
Page 1 of 2 Goto page 1, 2 Next |
|
| Author |
Message |
| Toby Sleigh... |
Posted: Tue Mar 03, 2009 6:16 pm |
|
|
|
Guest
|
Hi
I'm trying to import a very simple ( 12 columns, no fancy formatting,
originally generated by export from Paradox ) .xls into a Paradox table.
However I constantly get an error "Unable to get table field descriptions"
I've found various references to this problem , for example this
http://tinyurl.com/cs8vkv says it should work if all refs to aliases are
removed.
I've reduced what I am trying to the bare minimum, based on that thread, but
still get the error.
var
dt DataTransfer
endvar
dt.setSource("C:\\SSin\\Feb09.xls")
dt.setDest ("C:\\SSin\\Feb09.db")
dt.setDestFieldNamesFromFirst(True)
dt.setProblems ( True )
dt.getSourceRange()
dt.transferData ( )
nor does
importSpreadSheet("C:\\SSin\\Feb09.xls","C:\\SSin\\Feb09.db", "A1", "L300",
false)
work.
I would be really grateful for any ideas.
Excel 97 workbook,
Paradox 11 ( 11.0.0.300)
Win XP Prof sp3
thanks
Toby |
|
|
| Back to top |
|
|
|
| Liz McGuire... |
Posted: Tue Mar 03, 2009 11:47 pm |
|
|
|
Guest
|
1. Are you sure Excel hasn't conveniently saved the file as something newer
that Excel 5.0 without telling?
2. Are you sure the column headers in Excel are valid Paradox field names?
NOTE: Check bug PX0576 in Bertil's website: http://hem.bredband.net/bertilisberg/
(under current bugs). Is your spreadsheet read-only? Anywho, there are
a lot of bugs listed there, so just search the page for "spreadsheet" and
read them until you find a solution (or that there isn't a solution).
I believe Vladimir has a free library for dealing with Excel files: http://vmsoft.org/
Liz
"Toby Sleigh" <toby.sleigh at (no spam) gmail.com> wrote:
Quote:
However I constantly get an error "Unable to get table field descriptions"
var
dt DataTransfer
endvar
dt.setSource("C:\\SSin\\Feb09.xls")
dt.setDest ("C:\\SSin\\Feb09.db")
dt.setDestFieldNamesFromFirst(True)
dt.setProblems ( True )
dt.getSourceRange()
dt.transferData ( )
nor does
importSpreadSheet("C:\\SSin\\Feb09.xls","C:\\SSin\\Feb09.db", "A1", "L300",
false)
work.
I would be really grateful for any ideas.
Excel 97 workbook,
Paradox 11 ( 11.0.0.300)
Win XP Prof sp3 |
|
|
| Back to top |
|
|
|
| modri dirkac... |
Posted: Wed Mar 04, 2009 1:38 pm |
|
|
|
Guest
|
Does Vladimir's library work with Pdox7/32?
I can not get it to work.
But it works with Pdox 9.
Jure
"Liz McGuire" <liz at (no spam) paradoxcommunity.com> je napisal v sporočilo
news:49ad6d18$1 at (no spam) pnews.thedbcommunity.com ...
Quote:
1. Are you sure Excel hasn't conveniently saved the file as something
newer
that Excel 5.0 without telling?
2. Are you sure the column headers in Excel are valid Paradox field names?
NOTE: Check bug PX0576 in Bertil's website:
http://hem.bredband.net/bertilisberg/
(under current bugs). Is your spreadsheet read-only? Anywho, there are
a lot of bugs listed there, so just search the page for "spreadsheet" and
read them until you find a solution (or that there isn't a solution).
I believe Vladimir has a free library for dealing with Excel files:
http://vmsoft.org/
Liz
"Toby Sleigh" <toby.sleigh at (no spam) gmail.com> wrote:
However I constantly get an error "Unable to get table field descriptions"
var
dt DataTransfer
endvar
dt.setSource("C:\\SSin\\Feb09.xls")
dt.setDest ("C:\\SSin\\Feb09.db")
dt.setDestFieldNamesFromFirst(True)
dt.setProblems ( True )
dt.getSourceRange()
dt.transferData ( )
nor does
importSpreadSheet("C:\\SSin\\Feb09.xls","C:\\SSin\\Feb09.db", "A1",
"L300",
false)
work.
I would be really grateful for any ideas.
Excel 97 workbook,
Paradox 11 ( 11.0.0.300)
Win XP Prof sp3
|
|
|
| Back to top |
|
|
|
| Toby Sleigh... |
Posted: Wed Mar 04, 2009 2:15 pm |
|
|
|
Guest
|
"Liz McGuire" <liz at (no spam) paradoxcommunity.com> wrote in message
news:49ad6d18$1 at (no spam) pnews.thedbcommunity.com...
Quote:
1. Are you sure Excel hasn't conveniently saved the file as something
newer
that Excel 5.0 without telling?
2. Are you sure the column headers in Excel are valid Paradox field names?
NOTE: Check bug PX0576 in Bertil's website:
http://hem.bredband.net/bertilisberg/
(under current bugs). Is your spreadsheet read-only? Anywho, there are
a lot of bugs listed there, so just search the page for "spreadsheet" and
read them until you find a solution (or that there isn't a solution).
I believe Vladimir has a free library for dealing with Excel files:
http://vmsoft.org/
Liz
Hi Liz
1. I've tried save as to various versions, no difference.
2. Checked, plus the spreadsheet originated from a Paradox table.
3. I've checked through Bertil's bug list. I've tried
protecting/unprotecting, sticking the xls in the pdoxwin.exe directory etc.
I can't believe that a simple import from Excel should prove to be
impossible. I'll have a look at Vladimir's stuff next. Thanks.
Toby |
|
|
| Back to top |
|
|
|
| Jim Giner... |
Posted: Wed Mar 04, 2009 6:48 pm |
|
|
|
Guest
|
Hate to repeat something, but the message you get indicates something wrong
when pdx attempts to identify how to format the fields. Now that could be
not recognizing the data, or simply not being able to name the field (altho
I thought it would default to something generic). YOu never responded to
Liz's question on field names. Could you list them here?
Quote:
2. Are you sure the column headers in Excel are valid Paradox field
names?
Once we see valid names are being used, the next ? would be - is the data
consistent across the board? I do believe that pdox may operate a lot like
excel and establish the "type" of each field by the contents of the first
row's cells. You may have to ensure that the first row in your .xls
contains representative data in each col so pdox has something to work with
from the start. |
|
|
| Back to top |
|
|
|
| Toby Sleigh... |
Posted: Wed Mar 04, 2009 7:53 pm |
|
|
|
Guest
|
"Jim Giner" <jim.giner at (no spam) suny.edu> wrote in message
news:49ae78aa$1 at (no spam) pnews.thedbcommunity.com...
Quote: Hate to repeat something, but the message you get indicates something
wrong when pdx attempts to identify how to format the fields. Now that
could be not recognizing the data, or simply not being able to name the
field (altho I thought it would default to something generic). YOu never
responded to Liz's question on field names.
I did too, the field names came from the original Paradox table.
Could you list them here?
ok -
Job Number
Part Num
Model
QTY
Price
Availability
Date Ord
Ord by
Description
Our Ref
Bonded
ESCODid
Quote:
2. Are you sure the column headers in Excel are valid Paradox field
names?
Just in case I have tried renaming the column names to a,b,,,,,m , no
difference.
Then I deleted every column apart from the first column., no difference.
Quote: Once we see valid names are being used, the next ? would be - is the data
consistent across the board? I do believe that pdox may operate a lot
like excel and establish the "type" of each field by the contents of the
first row's cells. You may have to ensure that the first row in your .xls
contains representative data in each col so pdox has something to work
with from the start.
The first row contains representative data. I've seen the problem you refer
to before, when I've been importing manually, ie select then save as, when
the column contained serial numbers and the first row or two was by chance a
number, eg 1234567 then the next row was AB34567. The resultant table had
the column as a number field, rather than alpha. ( Or something like that ,
it was a while ago.)
All I want to do is export a small table to Excel, email the new spreadsheet
to a supplier, he fills in a couple of fields and sends the spreadsheet back
to us. |
|
|
| Back to top |
|
|
|
| Tony McGuire... |
Posted: Wed Mar 04, 2009 8:07 pm |
|
|
|
Guest
|
Toby Sleigh wrote:
Quote:
ok -
Job Number
Part Num
Model
QTY
Price
Availability
Date Ord
Ord by
Description
Our Ref
Bonded
ESCODid
Is 'Description" a multi-line field that could be interpretted differently
line-to-line from Excel? That's one of the common issues when going from
Excel to Paradox.
Are you importing to a NEW table each time, or an existing table? In other
words, is Paradox creating the table as it is bringing in the data? If so,
could you try bringing in the data to a table where you already have the
table/field definitions set as the data should be?
---------------
Tony McGuire
http://www.lostlore.com |
|
|
| Back to top |
|
|
|
| Jim Moseley... |
Posted: Wed Mar 04, 2009 8:49 pm |
|
|
|
Guest
|
Tony,
Quote: Are you importing to a NEW table each time, or an existing table?
I think Tony's on to something. Does this table already exist? If so, try
a new table like 'Feb09Input.db' or so & see if it still squawks.
dt.setDest ("C:\\SSin\\Feb09Input.db")
HTH,
Jim Moseley |
|
|
| Back to top |
|
|
|
| Toby Sleigh... |
Posted: Wed Mar 04, 2009 9:43 pm |
|
|
|
Guest
|
"Jim Moseley" <jmose at (no spam) mapson.attglobal.net> wrote in message
news:49ae9515$1 at (no spam) pnews.thedbcommunity.com...
Quote:
Tony,
Are you importing to a NEW table each time, or an existing table?
I think Tony's on to something. Does this table already exist? If so,
try
a new table like 'Feb09Input.db' or so & see if it still squawks.
dt.setDest ("C:\\SSin\\Feb09Input.db")
HTH,
Jim Moseley
Previously I've been trying to import to a new table so
I've just tried your suggestion.
Copied the original table the spreadsheet was exported from, into the
C:\SSin folder ,
emptied the table, renamed to Feb09Input.db and tried again
dt.setSource("C:\\SSin\\feb09.xls")
dt.setDest ("C:\\SSin\\Feb09input.db")
dt.setDestFieldNamesFromFirst(True)
dt.setProblems ( True )
dt.getSourceRange()
dt.transferData ( )
Still getting the same error.!!! |
|
|
| Back to top |
|
|
|
| Anders... |
Posted: Wed Mar 04, 2009 10:00 pm |
|
|
|
Guest
|
Toby,
I haven't followed all the post in this thread, but would it be possible for
you to post a example of a table you wish to import so we could try to see
if we get the same problem? If you make it with only a few test records and
zip it, I think it would be OK to break the "no attachment" rule in the NG.
Anders |
|
|
| Back to top |
|
|
|
| Jim Moseley... |
Posted: Wed Mar 04, 2009 11:43 pm |
|
|
|
Guest
|
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 |
|
|
| Back to top |
|
|
|
| Toby Sleigh... |
Posted: Wed Mar 04, 2009 11:44 pm |
|
|
|
Guest
|
"Toby Sleigh" <toby.sleigh at (no spam) gmail.com> wrote in message
news:_vWdndPigbosgjDUnZ2dnUVZ8geWnZ2d at (no spam) bt.com...
Quote: Hi
I'm trying to import a very simple ( 12 columns, no fancy formatting,
originally generated by export from Paradox ) .xls into a Paradox table.
However I constantly get an error "Unable to get table field descriptions"
I've found various references to this problem , for example this
http://tinyurl.com/cs8vkv says it should work if all refs to aliases are
removed.
I've reduced what I am trying to the bare minimum, based on that thread,
but still get the error.
var
dt DataTransfer
endvar
dt.setSource("C:\\SSin\\Feb09.xls")
dt.setDest ("C:\\SSin\\Feb09.db")
dt.setDestFieldNamesFromFirst(True)
dt.setProblems ( True )
dt.getSourceRange()
dt.transferData ( )
nor does
importSpreadSheet("C:\\SSin\\Feb09.xls","C:\\SSin\\Feb09.db", "A1",
"L300", false)
work.
I would be really grateful for any ideas.
Excel 97 workbook,
Paradox 11 ( 11.0.0.300)
Win XP Prof sp3
thanks
Toby
First off, thanks to everyone who tried to help.
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?
It all seems 100% ok, no funnies, everything runs ok.
Could open a book on the final result,
Windows 3 to 1 favourite
Excel 6 to 1
Paraodx 7 to 1
Virus scanner - Norton 8 to 1
Something else 10:1
Toby |
|
|
| Back to top |
|
|
|
| Jim Moseley... |
Posted: Wed Mar 04, 2009 11:52 pm |
|
|
|
Guest
|
Toby,
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?
Are you sure you have 'Full Control' Windows authority for the C:\SSin folder,
so that you can create a new file?
Jim Moseley |
|
|
| Back to top |
|
|
|
| Toby Sleigh... |
Posted: Wed Mar 04, 2009 11:53 pm |
|
|
|
Guest
|
"Jim Moseley" <jmose at (no spam) mapson.attglobal.net> wrote in message
news:49aebdd0$1 at (no spam) pnews.thedbcommunity.com...
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.
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
Hi Jim
Thanks for trying but the error "Unable to get table field descriptions"
seems to have been a red herring all along. grrrr!!
Toby |
|
|
| Back to top |
|
|
|
| Jim Giner... |
Posted: Thu Mar 05, 2009 1:07 am |
|
|
|
Guest
|
This worked just fine for me.
"Toby Sleigh" <toby.sleigh at (no spam) gmail.com> wrote in message
news:0uudnU8na7sYMTPUnZ2dnUVZ8gWWnZ2d at (no spam) bt.com...
Quote:
"Anders" <anders at (no spam) jREMOVEjonssondata.se> wrote in message
news:49aea4f0 at (no spam) pnews.thedbcommunity.com...
Toby,
I haven't followed all the post in this thread, but would it be possible
for
you to post a example of a table you wish to import so we could try to
see
if we get the same problem? If you make it with only a few test records
and
zip it, I think it would be OK to break the "no attachment" rule in the
NG.
Anders
ok , PSA.
Toby
|
|
|
| Back to top |
|
|
|
|
|
All times are GMT
The time now is Wed Dec 02, 2009 2:49 am
|
|