Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automating from javascript - can't get Excel window to front
I 've written some Javascript code to export a bunch of data to a an
Excel worksheet Everything works exactly as I would like, except that the Excel window is not opening in front of the browser window; the Excel window appears on the taskbar, blinking, and I need to click it to bring it to the front. Here is my code; what am I missing? function ExportExcel() { // Open Excel and export the view data to it var oXL = new ActiveXObject("Excel.Application"); oXL.Visible = true; var oWB = oXL.Workbooks.Add(); var oSheet = oWB.ActiveSheet; // Put the data on the sheet var RangeStart = 'A2'; var RangeEnd = 'E500'; var RangeText = RangeStart + ':' + RangeEnd; var oRange = oSheet.Range(RangeText) // GetExcelArray() simply returns the data oRange.Value = GetExcelArray(); oXL.Visible = true; oXL.UserControl = true; } |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help: Javascript to Excel VBA? | Excel Programming | |||
Open a webpage using Javascript in Excel | Excel Programming | |||
Need macro bring internet explorer window to front | Excel Programming | |||
Setting to Keep a Spreadsheet in Front Window | Excel Worksheet Functions | |||
Possible to write Excel macros in JavaScript? | Excel Programming |