How to save Excel file as a variable and pull data from it?
15 views (last 30 days)
I have an Excel file with several sheets. I would like to first read the whole Excel file and then just pull data from specific sheets. This is what I have now. This works but is very slow and I have to do this for every sheet.
And this is what I would like to do:
So, to make it more clear, I just want to read the whole file and store it as a variable ( k for example) and then when I need to read a specific sheet, just use that variable.
I cannot share my Excel file for various reasons, so I am just asking for some guidance.
Walter Roberson on 9 Jul 2021
Unfortunately, Mathworks does not provide any method of reading all sheets at the same time.
I am not familiar enough with the Excel object model to know if it is even possible with Excel to fetch data from multiple sheets at the same time.