[Advanced Excel] workbook_close, should we use it?

Forge Component
(55)
Published on 27 Aug by Hanno
55 votes
Published on 27 Aug by Hanno

Hi,


I am wondering, when opening a workbook, is it necessary to also call the workbook_close action?

(just reading an excel btw)

Hi,


the workbook_close action does the Dispose of the Workbook variable, so it should free the allocated memory quicker.

J. wrote:

Hi,


I am wondering, when opening a workbook, is it necessary to also call the workbook_close action?

(just reading an excel btw)

J, you don't have to, but it would be considered "good practice" to intentionally release the consumed memory, instead of relying on the underlying garbage collection to do so.

Hanno