Excel - copy excel filtered cells
Afficher commentaires plus anciens
I have a set of data (several rows and several columns) in one excel spreadsheet. It's possible to apply filter on some columns and as a result some rows become hidden.
I would like to copy the visible cells only but when I select some rows using "Range" matlab gets every rows existing inside the defined range, the visible ones and the hidden one.
Is there a way to select the visible cells only ? Or do you have any idea to go around it ?
Thanks a lot!
3 commentaires
Bob Thompson
le 9 Jan 2020
What kind of filtering are you using? Can you not just filter the results in the imported Matlab information?
The reason the import doesn't work this way is because Excel doesn't technically get rid of the information between, it just hides the filtered rows. You could edit your range to include the specific rows, but most likely that will be more effort than it's worth. You can also try copy and pasting the visible excel information into a matrix in matlab, but any mixed information will make this difficult.
Lucas SCHUBER
le 9 Jan 2020
Bob Thompson
le 9 Jan 2020
It might be possible to identify the visibility flag using the ActX server, but doing so would force you to probably rewrite your entire interction with Excel. I suggest sticking with the macro you have written now, unless there are more specific issues of why you don't like that method.
Réponses (0)
Catégories
En savoir plus sur Spreadsheets dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!