//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); //Change the path to the real file path when open. XlsxOpenOptions options = new XlsxOpenOptions { Password = "123456" }; workbook.Open(System.IO.Path.Combine(this.CurrentDirectory, "source.xlsx"), options);
' Create a new Workbook Dim workbook As New Workbook 'Change the path to the real file path when open. Dim options As New XlsxOpenOptions With { .Password = "123456" } workbook.Open(IO.Path.Combine(CurrentDirectory, "source.xlsx"), options)