I just found out that Xojo (or the plugin?) with the free Excel Viewer no longer works. Is anyone else having this problem? The free Excel Viewer can be downloaded from Free 2007 Excel Viewer . Example code is as follows:
[code] Dim excel As New ExcelApplication
excel.Visible = True
excel.Workbooks.Add
excel = Nil
Exception err as OLEException
MsgBox err.Message
[/code]
I created Feedback 29385 to investigate this issue further. Thanks for your help,
I can open up the viewer no problem from within xojo (R2) and that automatically invokes the open file dialogue in the viewer. What I am unable to do is to pass a command line to the viewer with the (for example) .xlsx file.
I am hacking it using
Dim F as new FolderItem
Dim A as String =
A=“E:\OFFICE 2010\Office12\xlview e:\office 2010\office12\book1.xlsx” // this does not work but A=“E:\OFFICE 2010\Office12\xlview” will
f.name=A
f.Launch
if A is set “E:\OFFICE 2010\Office12\xlview” then the viewer opens up but with the .xlsx filename it does not - yet
“E:\OFFICE 2010\Office12\xlview book1.xlsx” works just fine from the start menu
[quote]Dim F as new FolderItem
Dim A as String =
A=“E:\OFFICE 2010\Office12\xlview e:\office 2010\office12\book1.xlsx” // this does not work but A=“E:\OFFICE 2010\Office12\xlview” will
f.name=A
f.Launch
[/quote]
@Nick, what about this:
Dim F as new FolderItem("e:\\office 2010\\office12\\book1.xlsx")
f.Launch
The issue is not the double quote marks (as far as I can workout) - the issue is when passing a file name (like book1.xlsx) when the full path has a space in it like “E:\office 2010\office12\book1.xlsx” does not work. The space (between office and 2010) is representing an end of the passed variable. So when using
Dim F as new Folderitem(“E:\office 2010\office12\xlview E:\office 2010\office12\book1.xlsx”)
the viewer loads up and it throws two errors " - “E:\office.xlsx” could not be found AND “office12\book1.xlsx” could not be found. This is not a xojo problem but an office problem as far as I can see.