Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import XLS files without Excel
Message
 
 
To
30/11/2018 10:28:44
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2012
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01663866
Message ID:
01663914
Views:
33
>>>>>>>>I might be wrong, but I thought there was a tool that allows importing XLS files without having Excel installed?
>>>>>>>
>>>>>>>Unzip the xlsx, and then in the xl subfolder there's sheet1.xml, sheet2.xml etc. Then read the xml and get the values.
>>>>>>
>>>>>>PMFJI, but how do you Unzip an xlsx file? I am using legacy pkzip25.exe but I can't figure what you mean.
>>>>>
>>>>>Just like you unzip any other zip file, just
>>>>>
>>>>>pkzip25 -ext=all -nofix -over=all whatever.xlsx
>>>>
>>>>My pkzip25 always looks for the extension .zip. That is, the above syntax creates an error
>>>>
>>>>cannot find .zip file: whatever.xlsx.zip
>>>>
>>>>But if I rename it to .zip, it works.
>>>
>>>A, stupid windows and whoever invented file extnsions in the first place is probably just as a great idiot as the guy who decided that these should be handled invisibly... they created so much confusion, even seasoned programmers like you can't get it clear - when is a dot in the name really meaning the extension, or is the extension assumed. Well, in your case, it seems to be assumed, it thinks the extension is to be .zip... so I had to try this:
>>>
>>>pkzip25 -ext=all -nofix -over=all "whatever.xlsx"
>>>
>>>but no, doesn't work either, you really have to rename it to a .zip - well I guess Phil Katz didn't foresee, 20 years ago, that there will be zips masked as other file types.
>>
>>Nobody can foresee so many or fewer years in advance. Having said it, even when I rename the file to zip and unzip it, the content is not very usable to me. At least I cannot figure out how to get the data from the several xml files.
>
>"and then in the xl subfolder there's sheet1.xml, sheet2.xml"... and then inside it's actually relatively simple. Use some xml editor to straighten it out into a proper tree (or even IE would do it, unless it chokes).

I don't have the skill. I will wait to see if maybe someone replies to the Greg Green's project question. I am sure it is there, in his classes, I just can't find it now.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform