using xlswrite to edit excel, how to remove the 'content-selection' when I open it.

3 次查看(过去 30 天)
When I use xlswrite to edti an excel. then I open it, it will shows the edited part as bellow 'now: selection status'(with a gray box).But I want it to be as 'expected: no-selection status'

采纳的回答

Monisha Nalluru
Monisha Nalluru 2020-9-15
It is not recommed to use xlswrite(). Instead try to use writetable, writecell, writematrix.
The option of not selecting is not present with xlswrite().
But you can try to use UseExcel=false with above writefunctions
  3 个评论
Leo Zhai
Leo Zhai 2020-9-21
Thanks, M.N
  1. I am using R2013b, only 'writetable' is available, but not 'writecell' nor 'writematrx', But 'UseExcel' is not available either in R2013b.
  2. In R2019b, 'writetable' could sovle my issue, even not using 'UseExcel'.
I am now using the way in 2013b of, thanks to @Image Analyst. while it will slow down a bit of my program.
Image Analyst
Image Analyst 2020-9-21
Yes, with old versions of MATLAB, they did not leave the Excel running as an ActiveX server so each time you called it, it has to launch Excel all over again. The way around that is to use ActiveX the whole way though. I'm attaching an example.

请先登录,再进行评论。

更多回答(1 个)

Image Analyst
Image Analyst 2020-9-14
You can call xlswrite() again to just write 'Req#' to A1
xlswrite(fileName, 'Req #', sheetName, 'A1');

标签

产品


版本

R2013b

Community Treasure Hunt

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

Start Hunting!

Translated by