Name
xlsx.Open -- open an XLSX document for reading and/or writing
Synopsis
[id] = xlsx.Open(id, filename$)
Function
This function attempts to open the XLSX document specified by filename$ and assigns id to it. If you pass Nil in id, xlsx.Open() will automatically choose a vacant identifier and return it. The file specified in filename$ must exist or this function will fail. If you want to create a new xlsx document, use the xlsx.Create() function.

Although xlsx.hwp will automatically close all open XLSX documents when it quits, it is strongly advised that you close an open XLSX document when you are done with it using the xlsx.Close() function because otherwise you are wasting resources.

Note that xlsx.Open() will create a standard Hollywood object which can also be used with functions from Hollywood's object library such as GetAttribute(), SetObjectData(), GetObjectData(), etc. See xlsx.GetObjectType for details.

Inputs
id
identifier for the XLSX document or Nil for auto id selection
filename$
name of the file to open
Results
id
optional: identifier of the document; will only be returned when you pass Nil as argument 1 (see above)
Example
xlsx.Open(1, "test.xlsx")
cols = xlsx.GetColumnCount(1)
rows = xlsx.GetRowCount(1)
For Local y = 1 To rows
   For Local x = 1 to cols
      DebugPrint((xlsx.GetCellValue(1, x, y)))
   Next
   DebugPrint("************************")
Next
xlsx.Close(1)
The code above opens test.xlsx and prints the values of all cells.

Show TOC