IT SOLUTIONS
Your full service technology partner! 
+Expand
   ► MB LobbyCorel Paradox / ObjectPAL Coding BoardParadox to/from Other Data Sources Topic   Print This     

Importing an Excel Spreadsheet

Importing an Excel Spreadsheet in Paradox to/from Other Data Sources topic (part of our Corel Paradox / ObjectPAL Coding group).

Quick Search: Importing   Spreadsheet   Importing Excel   Importing Excel Spreadsheet  
jcryer-williams
-- USA

Could anybody tell me why, if I try to code an import procedure I get the the message
"Unable to get table field descriptions", when I run it .What does this mean ?
I have no problems doing the import manually.

The code for the procedure is as follows, it is on one line in the coding.

importspreadsheet(":filters:dailysales.xls",":filters:dailysales.db","a:a1","a:f65000",true)


Any help would be ghratefully received.
Thanks

 Posted 24 years ago (Thread Starter)
Comment Quote
About jcryer-williams +Expand
Location=-- USA 
Joined=24 years ago   MB Posts=9  
Moderator
Mike Prestwood
Prestwood IT
Prestwood IT office in Citrus Heights, CA
The last parameter you have set to "true". This tells ObjectPAL to get the fieldnames from the first row. My first guess is that the first row of the spreadsheet is empty. If so, try setting the last parameter to False and see what happens.

--
Mike Prestwood
Prestwood IT Solutions

 Posted 24 years ago
Comment Quote
About Mike Prestwood +Expand
Location=Prestwood IT office in Citrus Heights, CA 
Joined=25 years ago   MB Posts=1410   KB Posts=1805   KB Comments=53   BLOG, Topics=4  
Most Recent Post
jcryer-williams
-- USA
greentgm,

We have found a way round the problem, as we are using aliases in the BDE, Our original code was thus,
importspreadsheet(":filters:dailysales.xls",":filters:dailysales.db","a:a1","a:f65000",true)
where :filters: is our alias.

To get round it, we used the following....

proc import_file()
var
db database
endvar

db.open(":filters:")

importspreadsheet("dailysales.xls",":filters:dailysales.db","","",true)

endproc

This opens the alias, and allows us to open the spreadsheet, and by including :filters: in the second parameter, the .db is forced into the correct directory. The third and fourth parameter are "" so that it does not need a specific range,(we tried leaving this out completely, but we just got a syntax error).Then we set the last value to true, even though this is supposed to be the default, and therefore not required, we found the script would not work without it!

This worked for us, and I hope it helps you! Big Grin! Big Grin!
 Posted 24 years ago (Thread Starter)
Comment Quote
About jcryer-williams +Expand
Location=-- USA 
Joined=24 years ago   MB Posts=9  
Glenn.G
Brisbane, -- AU
Mike;

Might I refer you to a posting of mine dated 3/11/01 titled Importing Excel Spreadsheets.
I have had the same problem as detailed above. My spreadsheet definitely does not have a blank row.
PS. Your books are brilliant (I have several) and they are an invaluable resource. Will you be doing one for 10 or are there too few changes in the new version?
 Posted 24 years ago
Comment Quote
About Glenn.G +Expand
Location=Brisbane, -- AU 
Joined=22 years ago   MB Posts=36  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P195A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #2311 Counter
4344
Since 4/2/2008

Regarding...

Linked Knowledge Base Article.

This thread is linked to the following KB article.


Mike Prestwood
1. Importing and Exporting Spreadsheets Demo of importing and exporting spreadsheets using ObjectPAL.
Posted to KB Topic: OPAL: Language Details
17 years ago, and updated 17 years ago
(2 KB Comments)

KB Post
Nothing New Since Your Last Visit
14039
Hits

Corel Paradox / ObjectPAL Coding

Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2025 Prestwood IT Solutions.   [Security & Privacy]