The X Collection

Collection of programs that ease interaction with Excel files.
1,2K Downloads
Aktualisiert 21 Jan 2015

Lizenz anzeigen

Anmerkung des Herausgebers: This file was selected as MATLAB Central Pick of the Week

The X collection is a set of Matlab programs that make it easier for the user to interact with Excel sheets. Matlab offers already many ways of exchanging data with Excel. For instance 'xlsread' and 'xlswrite' allow the programmer to read data from and write data into Excel worksheets. But these programs are inefficient when a large number of read and write operations have to be repeated because they build a connection to the Excel COM server and then release this connection again with every operation.

The X collection splits that up. The programmer creates a connection to Excel (with XConnect), then does whatever he or she has to do (XWrite, XRead, XOpenBook, XGetSheet, XSaveBook etc), and then releases the Excel connection again (XDisconnect). Depending on the type of work, the gain in speed range from none at all to orders of magnitude.
The following programs are included: XConnect, XDisconnect, XListOpenBooks, XGetBook, XNewBook, XOpenBook, XFetch, XSaveBook, XSaveAllBooks, XCloseBook, XCloseAllBooks, XListSheets, XGetSheet, XAddSheet, XRead, XWrite, XWriteDates, XDateFmt, XRangeAddress.

Their meanings should be more or less obvious. They all come with help, so that you user should be able to figure out how to use these programs fairly easily. There is also a short documentation (PDF file) as well as an example script (examples.m) that demonstrates many of these programs.

Should you need help with this, please contact me. If you find this contribution useful, please comment below.

Zitieren als

Yvan Lengwiler (2024). The X Collection (https://www.mathworks.com/matlabcentral/fileexchange/48551-the-x-collection), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2014a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
1.5.0.0

Access to online worksheets was possible with XOpenBook already, but XFetch provides even easier access to files on Yahoo Finance, Google Finance, FRED Database of the FRB St.Louis, and Penn World Table 8.0.

1.4.0.0

XOpenBook now handles Excel files that are online and opens them directly

1.3.0.0

XWrite now also handles tables.

1.2.0.0

New support for exporting Matlab figures into Excel worksheets (with XWrite)
Ranges can now be in coordinate form (i.e. [3,2]) or in 'A1'-style (i.e. 'B3')

1.1.0.0

improved error messages in functions,
corrected typos in description in FEX

1.0.0.0