|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Edit excel using jscript
hi every body
need to read / write data to the excel sheet " xls " via jscript and i allready got this code : <html> <script> function mytest1() { var Excel, Book; // Declare the variables Excel = new ActiveXObject("Excel.Application"); // Create the Excel application object. Excel.Visible = false; // Make Excel invisible. Book = Excel.Workbooks.Add() // Create a new work book. Book.ActiveSheet.Cells(1,1).Value = document.all.my_textarea1.value; Book.SaveAs("d:/book1.xls"); Excel.Quit(); // Close Excel with the Quit method on the Application object. } function mytest2() { var Excel; Excel = new ActiveXObject("Excel.Application"); Excel.Visible = false; form1.my_textarea2.value = Excel.Workbooks.Open("d:/book1.xls").ActiveSheet.Cells(1,1).Value; Excel.Quit(); } </script> <body> <form name="form1"> <input type=button onClick="mytest1();" value="Send Excel Data"><input type=text name="my_textarea1" size=70 value="enter ur data here"> <br><br> <input type=button onClick="mytest2();" value="Get Excel Data"><input type=text name="my_textarea2" size=70 value="no data collected yet"> </form> </body> </html> but it doesnt work and why cant i see refering to where excel sheet is ? for example "d:\\book.xls" thank you for advance > |
|
#2
|
|||
|
|||
|
please answer me
its my final attempt ! |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Edit excel using jscript |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|