Is there a library for processing Excel.xlsb (BIFF12) files without the (slow) COM API (Interop)?

I found many files for managing Excel 2007/2010 files on the Internet, some of them are independent of the MS Office COM API. Some are free, some for (a lot) of money. Most, if not all, support the old binary .xls format (Excel 97-2003 BIFF8), and also not the Office Open XML.xlsx binary, but .xlsx loads 4 times more [1] than. xlsb and .xls only support 256 columns.


[1] Also .xlsx saves 2 times slower than xlsb. I checked this on a generated sheet with 10'000 rows * 1'000 columns = 10'000'000 (10 ^ 7) cells of simple chain formulas =โ€ฆ+1 :

 โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฅโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ•‘ .xlsx โ”‚ .xlsb โ”‚ โ•žโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฌโ•โ•โ•โ•โ•โ•โ•โ•โ•ชโ•โ•โ•โ•โ•โ•โ•โ•โ•ก โ”‚ loading time โ•‘ 165s โ”‚ 43s โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ซโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ saving time โ•‘ 115s โ”‚ 61s โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ซโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ file size โ•‘ 91 MB โ”‚ 65 MB โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•จโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ 

The test was performed on a computer running Windows 7 with a 2.3 GHz Core2Duo processor, 4 GB of RAM and a 5400 rpm SATA II hard drive; the computer was under some load from other processes.

+4
source share
3 answers

If you prefer to use the java library, I suggest using Aspose.Cell . But you have to pay from $ 999.

Other alternatives are to use the libreoffice command line, in order to read the xlsb file you must first convert it to csv. From terminal:

 libreoffice --headless --convert-to csv your_csv_file.csv --outdir /path/csv 

And to convert encoding using UTF-8:

 iconv -f ISO-8859-1 -t UTF-8 your_csv_file.csv > new_file_csv.csv 

this was the best solution I have found so far if you cannot use the Microsoft Office utility to work with the XLSB file.

+1
source

Aspose.Cells has added support for .xlsb , but probably not (yet) a full feature set.

I am sure (for several reasons) that they do not use COM.

Aspose.Cells costs $ 1000 up. Free trial versions available .


Any alternatives?

0
source

The current stable versions of LibreOffice (3.5.0) and OpenOffice.org (3.2.0) can read .xlsb , but not write .

(So โ€‹โ€‹this does not help me, but) if someone needs a free module to read .xlsb and have time on their hands, they can try the ones that are in these open source projects ' repositories.

You can also check out other FOSS Office projects to see if they have implemented something similar. If so, please post the results here.

0
source

Source: https://habr.com/ru/post/1400679/


All Articles