Comments (6)
@PranksterDr Hi! At the moment, an analogue of the Select object is not implemented in Spreeedsheets, so at the moment the implementation of copy and paste is possible using algorithms. Perhaps the ApiRange.ForEach method implementation will help you, allowing you to work comfortably with the cells of the selected area using callback. Also your solutions using this method will be sufficiently productive in view of the low-level optimization in the browser's JavaScript engine.
An article with js performance research methods.
A simple example of copying using ForEach
oSheet = Api.GetActiveSheet();
oRange = oSheet.GetRange('A1:C1');
numCurrentRow = 3;
oRange.ForEach(function(range) {
oValue2 = range.GetValue2();
numCol = range.GetCol();
oCurrentRow = oSheet.GetRangeByNumber(numCurrentRow, numCol);
oCurrentRow.SetValue(oValue2);
});
from onlyoffice.github.io.
Hi, could you describe in more details what you want to do?
You want to be able to copy some text to buffer and past in some other application?
I'm not sure if this possible, since we even have varning when you use Paste
button about it working correctly only in current tab of Editors
from onlyoffice.github.io.
No. I try copy range and paste this range in other row with macros. Is it possible with JS into spreedsheet ? Ofcourse old valuei need save. (Я имею ввиду, что пытаюсь с помощью JS сделать дубликат строки. Т.е. мне необходимо создать пустую строку со сдвигом вниз и заполнить ее данными из предыдущей строки)
from onlyoffice.github.io.
Например VBA позволяет копировать и вставлять как ячейки, так и диапазоны и строки, и столбцы. Для этого есть метод Selection, который включает Copy и Paste. Можно конечно на JS сделать перебор всего массива и последующим сдвигом вниз всего массива. Но это очень ресурсоемкая операция.
from onlyoffice.github.io.
@askonev Please take a look at this issue, could you help to clarify that?
from onlyoffice.github.io.
@askonev Hey! Thanks for the answer ! I completed this task in the same way using a loop. But still, the copy and paste function is missing(sad). It will be very cool if it will appear in the next versions of the API. In my work I using a loop implemented a method for duplicating rows.
from onlyoffice.github.io.
Related Issues (20)
- Allow using ChatGPT Plugin with LocalAI HOT 1
- Restore Zotero Citations from a Zotero_Transfer_Document HOT 1
- Support more languages for AutoComplete plugin HOT 3
- [Feature] Add support for Bergamot Translator HOT 2
- Allow users to post-hoc edit zotero citation fields HOT 2
- Don't show pdfs in zotero citation preview HOT 1
- Translator Plugin not working HOT 2
- Allow to insert only year of citation with Zotero plugin HOT 1
- Ability to edit a citation HOT 3
- ChatGPT Plugin for OnlyOffice 7.5.0 HOT 3
- Add support for privateGPT HOT 2
- Zotero: support for superscript/subscript in references HOT 10
- ChatGPT for desktop does NOT work HOT 2
- Languagetool does not allow for grammar rule customization HOT 1
- Zotero plugin: refresh moves view around HOT 1
- zotero bibliography generation has some problems HOT 5
- fetch in macro has CORS error
- Zotero Plugin Cannot Add Page Number to Citation HOT 1
- Disruption in Citation Insertion with zotero HOT 1
- Reordering citation numbers after inserting a new citation in IEEE format with Zotero Plugin HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onlyoffice.github.io.