Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3353

Re: Reading Excel file from Application Server

$
0
0

Bad news first. There is no such thing as an easy approach to working with excel!

 

Assumed you got the import (in binary format) alright - what would you do then?

 

You can never be certain that the contents matches the extension. And excel is not equal to excel.

Through the generations, the format has undergone several changes, probably the reason, why there is no FM dealing with that (which on?) format directly.

Older versions have a proprietory format, which is accessible (with reasonable effort) only by OLE integration.

The provided links will give you some insight but they don't cover the topic by far.

If you really have to read the file from application server, OLE is not an option. On the lucky side, you usually don't have true excel on the application server, unless they got there by some file transfer.

 

So first step for you - analyse an examplary file on byte level. Which format does it really have.

Some "excel" files are in truth csv-files, only provided with the wrong extension.

If it is really an excel, you can only hope, that it's an xlsx, since they do have a readable format.

Xlsx-files are in truth zip archives, containing a number of xml-files, that can be interpreted.

Don't get me wrong, it's still a lot of work but can be done.

 

If bad comes to worst and you're stuck with a proprietory xls, you might think of an intermedeate step, involving transferring to presentation server and then, depending on the actual business case, reopening from there by means of OLE, or converting to csv (involving VB-macro?) and process as plain text.

Again, depending on the actual case, there are limitations to this, regarding the file size.

 

There is plenty of stuff here on scn and you can dump a lot of hours only by gathering the basics.

On the other hand, you can try to change the outer conditions towards a more easy to handle format (csv)

 

In any case - good luck.

 

Best regards - Jörg


Viewing all articles
Browse latest Browse all 3353

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>