Open kojo12228 opened 2 years ago
Oh this is very interesting. Let me have a think...
Ok, @kojo12228, I've had a think about this and I love it! I've made a branch called ListOfLists
.
Feel free to dive in straight away. Meanwhile I'll add a few 'getting started' tips in case you haven't worked it all out already.
Thanks for this.
@kojo12228 I've now added a Contributing.md
which outlines the setup and developer workflow:
https://github.com/misterspeedy/FsExcel/blob/main/Contributing.md
Honestly, I feel I've created a bit of a monster here so perhaps we should move away from having the tutorial generate the regression tests. Anyway, for now 'it is what it is'.
Hope you are able to try out that list-of-lists feature, it feels like it could be a big improvement.
Thankyou!
Thanks @misterspeedy, I'm going to give it a try over the weekend hopefully.
Since F# London, I've been giving FsExcel a bit of thought and came to the conclusion that it might be nicer to work with if it supported using a list of lists.
Thus:
To be consistent with the current API, an
Item list
would be a row of cells, and anItem list list
would be the grid of cells (collection of rows).So taking examples from the README:
Multiple Cells
Vertical Movement
Absolute Positioning
For this example, I'm going to make another proposal for
EmptyCell
as a type ofItem
, byGo
should still work in this system, it's probably need to be separated into distinctGoRow
andGoCol
.Go (RC(_, _))
wouldn't easily translate:For better type safety,
AsFile'
could beRender.AsFile': path: string -> items: Item [,] -> unit
, butArray2D
is definitely not as nice to work with compared to list comprehension.This is pretty big change, so thought best to create an issue first. I would be happy to create a PR for this, just for the sake of playing around with the library more than anything.