title | description | ms.date | ms.topic | ms.localizationpriority |
---|---|---|---|---|
Read or write to large ranges using the Excel JavaScript API |
Learn how to read or write to large ranges with the Excel JavaScript API. |
04/02/2021 |
best-practice |
medium |
This article describes how to handle reading and writing to large ranges with the Excel JavaScript API.
If a range contains a large number of cells, values, number formats, or formulas, it may not be possible to run API operations on that range. The API will always make a best attempt to run the requested operation on a range (i.e., to retrieve or write the specified data), but attempting to perform read or write operations for a large range may result in an API error due to excessive resource utilization. To avoid such errors, we recommend that you run separate read or write operations for smaller subsets of a large range, instead of attempting to run a single read or write operation on a large range.
For details on the system limitations, see the "Excel add-ins" section of Resource limits and performance optimization for Office Add-ins.
Ranges can have formats applied to individual cells based on conditions. For more information about this, see Apply conditional formatting to Excel ranges.