![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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) gmail (DOT) 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 |
#4
| |||
| |||
|
|
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 |
#5
| |||
| |||
|
|
2. Are you sure the column headers in Excel are valid Paradox field names? |
#6
| |||
| |||
|
|
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. |
|
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. |
#7
| |||
| |||
|
|
ok - Job Number Part Num Model QTY Price Availability Date Ord Ord by Description Our Ref Bonded ESCODid |
#8
| |||
| |||
|
|
"Jim Giner" <jim.giner (AT) suny (DOT) edu> wrote in message news:49ae78aa$1 (AT) pnews (DOT) thedbcommunity.com... 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 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. 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. |
#9
| |||
| |||
|
|
Are you importing to a NEW table each time, or an existing table? |
#10
| |||
| |||
|
|
As soon as I tried it out myself I remembered the problem. Because EXCEL is processing the command first (on an export, I guess pdox processes the command first), you CANNOT use an alias in the paths of the file references in the command line - you must be explicit. Works great after you change those. Instead of importspreadsheet(":myalias:myfile.xls",":myalias: myfile.db",........) you must say importspreadsheet("c:\\folder1\\subfolder1\\myfile .xls","c:\\folder1\\subfolder1\\myfile.db",.....) One of those un-documented quirks. |
|
"Toby Sleigh" <toby.sleigh (AT) gmail (DOT) com> wrote in message news:VtadnX417ZtfGjPUnZ2dnUVZ8v-WnZ2d (AT) bt (DOT) com... "Jim Giner" <jim.giner (AT) suny (DOT) edu> wrote in message news:49ae78aa$1 (AT) pnews (DOT) thedbcommunity.com... 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 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. 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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |