Commit e9411f88 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Реализовал чтение даты и возврат.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61582 954022d7-b5bf-4e40-9824-e11837661b57
parent f14bec10
......@@ -2566,10 +2566,11 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
}
};
// Выставление данных
spreadsheet_api.prototype.asc_setData = function(data) {
this.wb.getWorksheet().setData(data);
// Выставление данных (пока используется только для MailMerge)
spreadsheet_api.prototype.asc_setData = function(oData) {
this.wb.getWorksheet().setData(oData);
};
// Получение данных
spreadsheet_api.prototype.asc_getData = function() {
return this.wb.getWorksheet().getData();
};
......
......@@ -11009,11 +11009,37 @@
api._loadFonts(fonts, callback);
};
WorksheetView.prototype.setData = function (data) {
// ToDo Add code here
WorksheetView.prototype.setData = function (oData) {
History.Clear();
History.TurnOff();
var oAllRange = new Range(this.model, 0, 0, this.nRowsCount - 1, this.nColsCount - 1);
oAllRange.cleanAll();
History.TurnOn();
var row, oCell;
for (var r = 0; r < oData.length; ++r) {
row = oData[r];
for (var c = 0; c < row.length; ++c) {
if (row[c]) {
oCell = this._getVisibleCell(c, r);
oCell.setValue(row[c]);
}
}
}
};
WorksheetView.prototype.getData = function () {
// ToDo Add code here
var arrResult = [], cell, c, r, row;
var maxCols = Math.min(this.model.getColsCount(), gc_nMaxCol);
var maxRows = Math.min(this.model.getRowsCount(), gc_nMaxRow);
for (r = 0; r < maxRows; ++r) {
row = [];
for (c = 0; c < maxCols; ++c) {
cell = this.model._getCellNoEmpty(r, c);
row.push(cell ? cell.getValue() : '');
}
arrResult.push(row);
}
};
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment