TextInputStream from an Excel spreadsheet natively (no expensive plugins please :/)

Is it possbile to read in from an excel spreadsheet (if possible) that’s password protected with native classes ? If there is a plugin I need is it cheap/free ? Thanks

Hi Christopher,

Sure, this should be possible. The steps are to open an excel file with the free MSOfficeAutomation.rbx plugin supplied by Xojo, save the file as a text file with the same plugin, and open the TextInputStream with helpful code from the Xojo Online Help System .

I don’t believe there is a way to do this in one-step.



If you just want the data, you can read the cells directly once you have opened it, without going through the text file route.

once you have opened it ? Any code snippets ?

Hi Christopher,

Try this code from an earlier post:

[code] Dim excel As New ExcelApplication
Dim book As ExcelWorkbook

excel.Visible = True
book = excel.Workbooks.Add
excel.ActiveCell.Formula = “= SUM(A1:A2)”
excel.ActiveCell.FormulaR1C1 = “=R[-3]C+R[-2]C”
excel.ActiveCell.FormulaR1C1 = “=R[-2]C” [/code]

There is also example code in the Xojo file folder at:
C:\Program Files (x86)\Xojo\Xojo 2013r3.1\Example Projects\Platform-Specific\Windows\Office Automation

The online Xojo help file has an example:
Excel Automation

And the last document is “I wish I knew how to… program Excel with Xojo” which is located at RBLibrary

Happy to help,