Hi,
I Have a dialog button which generates an Excel Report. To create the Excel file I followed the description here:http://wiki.alphasoftware.com/Office...+in+Version+11
I do it like:
I installed Excel 2010 on the Server as it otherwise would throw an error, that it cannot find the Excel object.
But now when I click the button, the Excel Sheets are generated but Excel did not open up. So I checked my Test Server and there the Excel Sheet was open.
But what I really need is that if a User clicks this Export button that Excel opens on his Machine and he can see the data. Even better would be if one could open Excel without having to save it in beforehand.
Does anybody have a clue how I can make this work?
Thank you!
I Have a dialog button which generates an Excel Report. To create the Excel file I followed the description here:http://wiki.alphasoftware.com/Office...+in+Version+11
I do it like:
Code:
Dim tmpenvvar as C = API_GETENVIRONMENTVAR("TEMP") dim DocumentFile as C = tmpenvvar+"\MonthOverview_"+year+"_"+month+"_"+timestamp+".xlsx" 'get and process data CreateMonthOverview(Doc, year, month) Path = file.filename_parse(DocumentFile, "P") on error resume next File.Dir_Create(Path) on error goto 0 if Doc.Save(DocumentFile) ' Release all references to the document because we are about to open it in Excel delete Doc Dim xlApp as p xlApp = ole.create("Excel.Application") 'open your workbook xlApp.Workbooks.Open(DocumentFile) xlApp.DisplayAlerts = .F. xlApp.Visible = .T. 'comment this line out if you don't want to see Excel else ui_msg_box("Error Saving Document", "Unable to save document to " \ + DocumentFile + ":" + crlf(2) + Doc.ErrorMessage) end if
But now when I click the button, the Excel Sheets are generated but Excel did not open up. So I checked my Test Server and there the Excel Sheet was open.
But what I really need is that if a User clicks this Export button that Excel opens on his Machine and he can see the data. Even better would be if one could open Excel without having to save it in beforehand.
Does anybody have a clue how I can make this work?
Thank you!
Comment