question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reading a few excel rows takes so much time

See original GitHub issue

Greetings,

I’ve run against an issue where the reading operation takes so much time even though the excel file contains only a few rows. I’m building a Photoshop project or in other words, a Photoshop script but it seems Photoshop gets frozen/stuck forever whenever it tries to read the file. I’m using the demo stated on the main page.

#include "./xlsx.extendscript.js"

var workbook = XLSX.readFile('whateverpath');
var first_sheet_name = workbook.SheetNames[0];
var first_worksheet = workbook.Sheets[first_sheet_name];
var data = XLSX.utils.sheet_to_json(first_worksheet, {header:1});

$.writeln(data)

Excel file: TestInput.xlsx

Any clue?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
A1rPuncommented, Aug 22, 2019

You have to pay for ‘performance enhancements’.

0reactions
reviewhercommented, Oct 10, 2021

ExtendScript just can’t handle large arrays or large strings. Try:

var out = [1,2,3,4,5,6];
for(var i = 0; i < 700000; ++i) {
    out[i+6] = out[i];
    if((i % 1000) == 0) $.writeln(i);
}

Even after setting $.memCache = 1024*1024*1024*2 ExtendScript slows down after 100K and basically stops after 250K.

Read more comments on GitHub >

github_iconTop Results From Across the Web

10 Tricks to Fix Slow Excel Spreadsheets (Speed-up Excel)
In this tutorial, you will learn 10 tips to speed-up slow excel spreadsheets. Excel spreadsheets tend become heavy and slow as you load...
Read more >
Resolve "Excel Running Slow" Problem [8 Proven Ways]
The first and most common sign of Excel running very slow is that it is processing slow. It is taking too much time...
Read more >
Insert or delete rows very slow if custom sort on many named ...
Excel 2013 takes a very long time to insert or delete rows after a custom sort on many named columns. Article; 05/05/2022; 2...
Read more >
Faster way to read excel rows. - Power Platform Community
To sum up things: I would like to check the rows of a table in an excel file stored in OneDrive much quicker...
Read more >
Request Was Taking Too Long when you open a workbook in ...
This issue occurs if the workbook takes longer than 30 seconds to open in Excel Online. Although there can be many reasons why...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found