<html>
<head>
<input type='button' value='Excel';
onClick="javascript:
var xls = new ActiveXObject ( 'Excel.Application' );
xls.visible = true;
var newBook = xls.Workbooks.Add;
newBook.Worksheets.Add;
newBook.Worksheets(1).Activate;
newBook.Worksheets(1).Cells(1,1).value='1.25, 3.82';
newBook.Worksheets(1).Cells(2,1).value='2.1, 1';
newBook.Worksheets(1).Cells(1,2).value='1, 4';
newBook.Worksheets(1).Cells(2,2).value='10 , 12';
newBook.Worksheets(1).Name='WorkSheet from Javascript';
function test() {
with (Application) {
.UseSustemSeparators = true;
}
var LastCell = Range('B65536').End(xlUp).Offset(1);
LastCell.FormulaR1C1 = '=SUM(R1C:R[-1]C)';
LastCell.AutoFill LastCell.Resize(, 2);
LastCell.EntireRow.Cells(1) = 'Итог:';
}
"
// newBook.Worksheets(1).SaveAs('C:\\temp\\TEST2.XLS' );
</head>
</html>
как его модернизировать?)
|