matlab: Issue reading excel binary (.xlsb) file - excel

I am trying to read in (MATLAB 7.14.0.739 (R2012a), Ubuntu 12.04, filesize ~2MB) a binary excel file containing multiple sheets but get the following error:
[status,sheets,xlFormat] = xlsfinfo('633933_2014-07-04_11-34-27.xlsb')
status =
''
sheets =
Unreadable Excel file: File contains unexpected record length. Try
saving as Excel 98.
xlFormat =
''
I have a large number of these binary files so I don't want to have to resave them to another format if possible.

The documentation clearly states that the support for xlsb is limited to windows systems having excel installed.
You may try to find some 3rd party so, python or java library which can read xlsb but I am not aware of any. Otherwise you have to switch to a different format.

Related

What .xlsx file format is this?

Using an existing SSIS package, I was trying to import .xlsx files we received from a client. I received the error message:
External table is not in the expected format
These files will open in XL
When I use XL (currently XL2010) to Save As... the file without making any changes:
The new file imports just fine
The new file is 330% the size of the original file
When changing .xlsx to .zip and investigating the contents with WinZip:
The original file only has 4 .xml files and a _rels folder (with 2 .rels files):
The new file has the expected .xlsx contents:
Does anyone know what kind of file this could be?
It would be nice to develop my SSIS package to work with these original files, without having to open and re-save each file. There are only 12 files, so if there are no other options, opening/saving each file is not that big of deal...and I could automate it with VBA going forward.
Thanks for any help anyone can provide,
CTB
There are many Excel file formats.
The file you are trying to import may have another excel format but the extension is changed to .xlsx (it could be edited by someone else) , or it could be created with a different Excel version.
There is a Third-Part application called TridNet File Identifier which is an utility designed to identify file types from their binary signatures. you can use it to specify the real extension of the specified file.
Also after a simple search on External table is not in the expected format this error is thrown when the definition (or version) of the excel files supported in the connection string is different from the file selected. Check the connection string used in the excel connection manager. It might help to identify the version of the file.

Perl reading XLSX embeded documents

First post here so if I am doing something stupid, please let me know.
CentOS 7(3.10.0-123.6.3.el7.x86_64), perl5 (revision 5 version 16 subversion 3), Spreadsheet::ParseXLSX v0.16
I have an .xlsx that has some embedded .pdf's and another xlsx in embedded within it. I am trying to read these and insert them into a csv along with the original xlsx. After some googl'ing to no avail my thought was to unzip the original xlsx and read the files from the xl/embeddings directory but, alas there is something with the file that causes adobe reader to not be able to read the oleObject(X).bin files in that dir.
I have been able to successfully read all the worksheets that dio not contain embedded docs using Spreadsheet::ParseXLSX, works great. I have googled for a solution but am either not using correct search prams or ...
If you know how to do this can you point me to some instructions?
TIA,
JohnM

ColdFusion cfspreadsheet: error occurred while reading the Excel. The supplied POIFSFileSystem does not contain a BIFF8 'Workbook' entry

In ColdFusion 10 Spreadsheet:
I have a daily routine that reads a few Excel files and stores them in a database. I have recently started receiving a file with some macros. The service cannot read the file. If I open and save the file then it will be read.
Anyone knows what is going on here?
Here is my code:
<cfspreadsheet
action="read"
src="PJM Matrix MM 36-Mo 2014-02-28.xlsx"
query="data"
sheet = "2"
rows="1-588"
columnnames="A,B,C,D,E,F,G,H,I,J,K,L">
Here is the error:
An error occurred while reading the Excel:
java.lang.IllegalArgumentException:
The supplied POIFSFileSystem does not contain a BIFF8 'Workbook' entry.
Is it really an excel file?.
Here is my excel file:
https://dl.dropboxusercontent.com/u/71626816/PJM%20Matrix%20MM%2036-Mo%202014-02-28.xlsx
This error indicates that the spreadsheet you are trying to upload, belongs to a BIFF version prior to BIFF8. Coldfusion doesn't support reading these files. But when you open and save, the file becomes BIFF8 version and will be able to be processed. Currently there is no fix for this.
https://poi.apache.org/faq.html#faq-N10072
POI jars are responsible for reading spreadsheets in CF and they support only BIFF 8 version. Please check response for Q-6 in above url.

How to convert Paradox to Excel

I am trying to work with Paradox files and convert these to an Excel file.
Does anyone know how to achieve such conversion?
I wrote a small Python script to read Paradox .DB files.
But please be careful, it's not complete: some field types may not be converted (only memos AFAIK, but I'm not a Paradox expert).
https://gist.github.com/BertrandBordage/9892556
You can either read a .DB file as Python objects using paradox.read('your_file.DB') or convert it to a CSV file using paradox.to_csv('your_file.DB').

How do I read data from a excel worksheet in DB2

I need to write a Stored Proc/ Function which reads data from a worksheet of Excel workbook. How do I do it in DB2 ? I am using AIX os.
Tried Read Excel from DB2 but wont work on my OS.
Also tried
Import from FileName.csv of DEL COMMITCOUNT 1000 insert into TableName
but invain.
You have several options, the cleanest is probably to write a Java Stored Procedure, utilising the Apache POI library, if you intend to read Excel workbooks (.xls or .xlsx) rather than plain CSV formatted text files.
Not as clean but just as effective you can write a Perl / Python / PHP script to read the file and return a line at a time, and invoke the script from a stored procedure, see: Making Operating System Calls from SQL
Its be better to convert your excel file to flat file like csv if possible. Because DB2 not natively know excel file. Its csv file that can processed natively using IMPORT, LOAD or INGEST tools from DB2

Resources