How can I determinate which is the last column of an excel file?
2 次查看(过去 30 天)
显示 更早的评论
First of all, thanks for reading this. Well, I have an excel file with n variables (columns) and I have to read them with matlab, then I have to select one of them and do operations with that variable. Finally, I have to write/save that new variable in the same file, next to the last column used in that excel spreadsheet.
I doubt if I should use xlswrite, but I have to specify the column and the row where I want to "write" my new variable. I hope I had been explicit with my question. Greetings.
PD. If you could write parts of a code to be more explicit, I'll be grateful.
1 个评论
dpb
2014-6-25
Unless there's a method thru interacting w/ Excel, not sure there is a way to answer the question. You can find out how many columns have something in them by
size(raw,2)
after xlsread but that doesn't account for leading blank columns altho looks like gets intermediary ones filled in w/ NaN .
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!