Matlab error “Object returned error code of the xlswrite function: 0x800A03EC

The Object returned error code of “MATLAB error” xlswrite function: 0x800A03EC
(the 2013-07-27 09:43:29)

The reproduced ▼

The

tags: xlswrite it

categories: matlab

When using xlswrite in matlab to write data into Excel documents, an Error was sometimes reported:
Excel returns: Error: Object returns Error code: 0x800A03EC.

Case 1:

There are many reasons for this error: the most common is when the user writes more data to Excel than Excel can accommodate. The working interval for Excel2003 was 65,536 rows and 256 columns. In Excel2010, the working range was increased to 16,384 columns in 1,048,576 rows.

So in the event of this error,
When you try to write an Excel document first, name the document as an extension from 2007 onwards (.xlsx), not as an extension from 03 (.xls). But if the amount of data exceeds the size of Excel2010, you can only split the data into different Excel files.

Resources: Excel2010 specification

Excel specifications and limits

Situation 2:

This error also occurs if the Excel table name has a colon (:) in the sheetname. For example, use the following statement:

xlswrite(‘test.xlsx’,0, ‘Sheet1:Sheet2’, ‘A1’);

Cause of error: an invalid parameter is introduced to the fourth line “range” of Xlswrite. Xlswrite only supports the use of “A1” of Excel within a specified range.

If you do need to store data in different Sheets in Excel, you can take the form of a loop, where num2str can convert numeric types to string types.  
example:

For I = 1:3

xlswrite(‘test.xls’,1,[‘Sheet’ num2str(i)],’A1′);

end

Case 3:

The size of a single piece of data that a user can store is beyond what Excel can accept if you try
If you write a string greater than 1024 characters in an Excel cell, an error will occur. You can try that too
Name the document as an extension from 2007 onwards (.xlsx), not as a version 03 extension (.xls).

Situation 4:

This error also occurs if the size of the data field entered into the Excel cell is 0×N.

Situation 5:

This error occurs if the stored data begins with the equals sign “=”. Because the way Excel is typed in is theta =
The A1 * A2. So when you store it, it causes an error.

(PS: Situation 4 and 5 are from the network, not verified personally.)

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Resources: [MathWorks]
Why do I receive an error (error code: 0x800A03EC) when using XLSWRITE in MATLAB?

Read More: