Comments (10)
yes! Supercede is implementing this at the moment, the api is unstable but for reading it sort of works already here: https://github.com/SupercedeTech/xlsx [1]
We may change how the reading api works, (there are two engineers working on this now including me), but we settled on the shape of SheetItem
at least so you can program against that (stuff maybe added). I'm working on writing xlsx as well. The prototype for writing is done, but it may still have some bugs left.
We're intending to upstream the work once we got it to work reliably.
[1] note that's a different repo than mine, I originally implemented it as part of "research day" but now it turns out client actually need it so it got moved to supercede github.
from xlsx.
Working around it now with csv but there is definitely some interest here from the business side to producing xslx files, so I'll be doing this in the future.
Your review and feedback would be appreciated
from xlsx.
There was a ticket #7 about this
As there was no particular motivation it was closed.
If you're willing to contribute something like this I'd be glad to review the code.
from xlsx.
I have just run into this problem and will probably now have to convert to the file to CSV and use streaming via cassava.
from xlsx.
@jappeace if you made any progress on this which you can share, I could maybe work on it a bit more.
from xlsx.
@jappeace I notice you have done a lot of work here: https://github.com/jappeace/xlsx.
What I'd like to be able to do is read a row at a time e.g. to create a sum of a column. Is it possible to do this with your clone?
from xlsx.
Let me know if you need help, have questions or any issues. It's really important for the company I work for to get this right
from xlsx.
If you could show me how I would get e.g. rows 5, 6 and 7 from an .xlsx file and also how I can process a table row by row that would be really helpful.
At the moment I am using R to convert a tab in an .xlsx file to a .csv file and then using cassava with something like the following to get rows with indices in is
:
let bar :: [[String]] -> Records [String] -> IO [[String]]
bar acc baz =
case baz of
Cons (Left s) _ -> error s
Cons (Right []) r -> bar acc r
Cons (Right a@(x : _)) r -> if x `elem` (map show is)
then bar (a : acc) r
else bar acc r
Nil _ _ -> return acc
https://hackage.haskell.org/package/cassava-0.5.2.0/docs/Data-Csv-Streaming.html lets you process a row at a time which is what I want to do after I have processed the given rows.
Many thanks
from xlsx.
First obtain a producer conduit from your xlsx file, probably you want to use sourceFile. Then put that into readxlsx.
Now you have a conduit of sheetItems, which you can filter, and fold.
Mind you to use those combinator you have to combine with .| which makes the output of the left conduit the input to the right one.
It all seems a bit convoluted but it allows you to do lazy io (constant memory).
from xlsx.
Related Issues (20)
- Add search ability to Hackage page HOT 3
- Depend on microlens instead of lens? HOT 3
- NonEmpty list of worksheets HOT 3
- How to insert a row HOT 4
- Writing default stylesheet to file results in excel complaining it's invalid HOT 9
- microlens flag still builds lens as a dependency
- Hyperlink Support HOT 7
- Leaking merge information across worksheets HOT 1
- Handling dates before 1900-03-01 HOT 3
- Add newtype for column and row indexes
- Add integration test that checks correctness with xlsx validator
- Support lens v5.1 HOT 5
- Hackage docs are broken HOT 9
- We shouldn't be able to make sheetnames bigger then 31 characters. HOT 1
- Cell Range dataValidation problem HOT 5
- Still applying code formatting? HOT 4
- Proper support for cross-sheet references, was "Errors creating pivot tables in separate sheets" HOT 4
- Test files missing in sdist HOT 4
- Request: Minimal working example for styles HOT 3
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 xlsx.