Comments (3)
Good afternoon @jamninetyfive .
Today I encountered the same problem as you.
Here is an example code for reading Excel file data from the browser, unfortunately the performance is low.
It takes 40 seconds to read a file weighing approximately 8 megabytes (190,000 lines * 6 columns).
Example code:
<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/index.min.js"></script>
</head>
<body>
<input type="file" id="convert-button" multiple />
<script type="module" lang="js">
document
.getElementById("convert-button")
.addEventListener("change", async function (e) {
var excelize = await excelizeWASM.init(
"https://cdn.jsdelivr.net/npm/[email protected]/excelize.wasm.gz"
);
let reader = new FileReader();
reader.onload = function () {
let byteArray = new Uint8Array(reader.result);
let f = excelize.OpenReader(byteArray);
let rows = f.GetRows("<Sheet name>");
console.log(rows);
};
reader.readAsArrayBuffer(this.files[0]);
});
</script>
</body>
</html>
This may not be the best use of the library, but I hope it helps you.
I would be glad for any corrections, good luck.
from excelize-wasm.
Thank you for your try and reply. I have gained something. I think the time-consuming part may be in buffer conversion, but thank you for trying. Can it read images? @CapitanHeMo
from excelize-wasm.
Thank you for your try and reply. I have gained something. I think the time-consuming part may be in buffer conversion, but thank you for trying. Can it read images? @CapitanHeMo
I've tried this, tried reading 4000 images, it took 4 hours, my chrome crashed, and I can't stop it, there doesn't seem to be a solution.
from excelize-wasm.
Related Issues (8)
- memory running out HOT 3
- Argument type Buffer is not assignable to parameter type Uint8Array[] HOT 1
- Add support to fn GetStyle
- Feature request, add stream writer support 请问一下有考虑支持流式写入的功能吗? HOT 1
- Document / implement a formalized release process
- Working with Vite in the browser 浏览器下 vite 下运行 promise 报错 HOT 13
- [Feature request] Provide options for data validation drop list 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 excelize-wasm.