Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import XLS files without Excel
Message
From
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:
01663913
Views:
36
>>>>>>>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).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform