xlsread for multiple sheets?

5 vues (au cours des 30 derniers jours)
Matt Kocoloski
Matt Kocoloski le 17 Nov 2011
Hello,
Is it possible to import multiple sheets in an Excel workbook using a single call to xlsread? I have a ~100 MB spreadsheet with 72 tabs, each of which has the same format, which all need to be imported.
A single call of xlsread to this file takes about 45 seconds on my machine, and I'm wondering if there is a faster way than calling this function 72 individual times. Thanks a lot.
Matt

Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 17 Nov 2011
I don't think xlsread() currently supports it. You can use Excel COM server to speed up the process. Follow the link in this answer to see a brief introduction. The comments in the answer provide some code too.
  2 commentaires
Matt Kocoloski
Matt Kocoloski le 28 Nov 2011
Thanks a lot, Fangjun. I had never used this functionality before, but it was exactly what I was looking for. Runtime is down from about an hour to about 2 minutes. Thanks buddy.
Fangjun Jiang
Fangjun Jiang le 28 Nov 2011
Wow, that's a lot of saving on time!

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by