import of .cls crashes vfp9
import of .cls crashes vfp9
(OP)
import from .xls crashed vfp
Tried appending from .csv, but yields extra rows by cutting off before end of record though why it should do this after a close paren is beyond me.
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS Contact USThanks. We have received your request and will respond promptly. Come Join Us!Are you a
Computer / IT professional? Join Tek-Tips Forums!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines |
import of .cls crashes vfp9
|
Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.
Here's Why Members Love Tek-Tips Forums:
Register now while it's still free!
Already a member? Close this window and log in.
RE: import of .cls crashes vfp9
2. Import of XLS files only works up to a certain version of Excel, so VFP can't import all xls. Its inability does not start with the change o the totally differrent XLSX format. If there are multiplle sheets in the XLS, you may succeed if you only keep the first one and save in a legacy format - at most Excel 97 (version 5), IIRC.
3. In CSV importing VFP does not care for quoted text values with multiple lines, i.e. it takes a line feed withing quotes as end of record, so VFP's csv import capabilities are limited, too.
Also, are you using the IMPORT comand or APPEND TYPE XLS, or are you using the import wizard?
There are alternatives. If all else fails, ironically it helps to convert this to XLSX and use ImportFromXlsx from Vilhelm-Ion Praisach:
http://praisachion.blogspot.com/2016/08/importfrom...
Chriss
RE: import of .cls crashes vfp9
How exactly does the import "crash VFP". Do you see an error message? Does the program freeze? How are you performing the import (APPEND FROM? IMPORT command? Import Wizard?). And are you doing it as part of an application or interactively in the development environment?
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads
RE: import of .cls crashes vfp9
Thanks. Gets fatal error c0000005 message that refers to errorlog file that does not appear to exist where specified. (yes I have show hidden files on) screenshot attached. Click OK and immediate shutdown. If I just wait, freezes. file was downloaded as csv. So when that didn't work, I saved as xls old type (97-2003) to get where I am now.
append from yields "no sheet found"
Hence, trying import.
Now working from command window but Original attempt on csv is programmed as follows
CLOSE DATABASES
USE chaplist EXCLUSIVE
SET SAFETY OFF
ZAP
newfile = GETFILE("txt,csv","Go Database chapters Table")
APPEND FROM (newfile) TYPE delimited
SET SAFETY ON
RE: import of .cls crashes vfp9
You do use VFP ourself to do this, so pointing out code and tools helps.
But is it a 1 time requirement or regular?
CSV import has limitations, as said.
Opening CSV and saving as (97-2003) format is not giving exactly the binary format VFP needs to append or import. Then you're better off with the import tools I pointed out after you use Excel to open the CSV and save as modern XLSX format (2007 or higher). The backward compatibillity of saving as old formats was - at least it seems so - only tested to work with the old Excel itself, not with VFP importing. That discrepancy was well known as it came up. And it came up ca. 2007, which was after VFP9 was released. Still before it was discontinued, but you see, there is no MS VFP10, so there also can't be import from that only partially compatible legacy XLS format. To create the real XLS binary format VFP needs I think you'd need Excel 97.
So go with the modern format, the problem to import that has been solved. And isn't that even better?
Chriss
RE: import of .cls crashes vfp9
Sorry, I am a bit slow with thanksgiving and all.
I have tried importfromxlsx and it seems to bring the data over very nicely, but mostly in memo fields, so I am writing a little routine to map those over to appropriately typed regular fields. It requires positional consistency between the two files' fields, but that is a bearable burden.
For the case instant, this is a one time deal, but the same issue arises frequently with other tables, so for me it is a common issue any time I download a csv from ... which is fairly frequent for me. Until recently, no problems.
And yes, once I have my utility written, it will be easy to simply save as xlsx and go forth.
Thanks a bunch.