Regarding the Actxserver spec

1 visualización (últimos 30 días)
Gopalakrishnan venkatesan
Gopalakrishnan venkatesan el 13 de Mayo de 2015
Comentada: Gopalakrishnan venkatesan el 13 de Mayo de 2015
open_file = Activate.Workbooks.Open(fullfile(pwd, 'DD.xlsx'),0,false)
In the above expression what does 0 and false indicates?
Thank you

Respuesta aceptada

Guillaume
Guillaume el 13 de Mayo de 2015
Assuming that before the line you've shown there is a line:
Activate = actxserver('Excel.Application'); %And what a misleading variable name!
Then Open is an excel function. The whole excel interface is very well detailed by Microsoft. For example, this is the page about Open. On there you learn, that
  • 0 means do not update link in the workbook
  • false means do not open workbook as readonly
Since these are the default values anyway, they could just as well be omitted. It would make more sense since none of the other optional values are specified:
open_file = Activate.Worbooks.Open(fullfile(pwd, 'DD.xlsx')); %would do the same.

Más respuestas (0)

Categorías

Más información sobre Use COM Objects in MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by