Coder Social home page Coder Social logo

Sheet ordering in Spreadsheet about xlsx HOT 12 CLOSED

qrilka avatar qrilka commented on July 17, 2024
Sheet ordering in Spreadsheet

from xlsx.

Comments (12)

qrilka avatar qrilka commented on July 17, 2024

Do you have any good proposal how do add sheet order without breaking API much?

from xlsx.

alanz avatar alanz commented on July 17, 2024

I was thinking of perhaps adding an additional field _xlOrder :: Map Int Text or similar to give the original order.

Or even _xlOrder :: [Text]

That way you only see it if you need it.

from xlsx.

qrilka avatar qrilka commented on July 17, 2024

Then we should have some custom setters or something similar to prevent those fields getting out of sync

from xlsx.

alanz avatar alanz commented on July 17, 2024

Yes.

Otherwise move away from Map Text Sheet

Maybe do Map Int (Text,Sheet)

And then possibly generate an index from that from Text to Int if
needed.

On Thu, Oct 30, 2014 at 8:13 PM, Kirill Zaborsky [email protected]
wrote:

Then we should have some custom setters or something similar to prevent
those fields getting out of sync


Reply to this email directly or view it on GitHub
#16 (comment).

from xlsx.

qrilka avatar qrilka commented on July 17, 2024

Seems to be braking change,
About the implementation - do you want to make a PR or you have time until I'll get to it?

from xlsx.

alanz avatar alanz commented on July 17, 2024

I can work around it for now [calling the first sheet "AA_summary" instead
of "summary" :) ]

So I can wait. If I get time before you do I can also give it a go, but
because it is a breaking change we would need to decide what the best way
is.

On Thu, Oct 30, 2014 at 9:57 PM, Kirill Zaborsky [email protected]
wrote:

Seems to be braking change,
About the implementation - do you want to make a PR or you have time until
I'll get to it?


Reply to this email directly or view it on GitHub
#16 (comment).

from xlsx.

lessandro avatar lessandro commented on July 17, 2024

How about simply _xlSheets :: [(Text, Worksheet)]? There's no real need for a Map.

from xlsx.

qrilka avatar qrilka commented on July 17, 2024

Maybe you are right but what about API for that key-value list? I mean API e.g. to change sheet order or something like that?
Not saying that something like that for Map already :)

from xlsx.

lessandro avatar lessandro commented on July 17, 2024

I don't quite understand what you mean, but you can use lookup from Prelude to find a specific sheet by name, and normal list operations to reorder the sheets.

from xlsx.

qrilka avatar qrilka commented on July 17, 2024

Sure about lookup but I was referring about something like atSheet but working on sheet index level.
I.e. I want to get some API which could allow access sheets both on their names and indices and preferrably allowing to "mutate" those indices e.g. allowing some convenient lenses to reorder sheets.
Probably I want some magic from lenses not knowing them good enough :)
But thanks for the idea

from xlsx.

alanz avatar alanz commented on July 17, 2024

I think it should either be dead simple, so that you put your list of
sheets together at the end and write it out, or have the complex API.

I suspect that a simple list should do it, and if people need to mutate in
a complex way they must put their own layer on top.

On Tue, Nov 18, 2014 at 9:29 PM, Kirill Zaborsky [email protected]
wrote:

Sure about lookup but I was referring about something like atSheet
http://hackage.haskell.org/package/xlsx-0.1.0.3/docs/Codec-Xlsx-Lens.html#v:atSheet
but working on sheet index level.
I.e. I want to get some API which could allow access sheets both on their
names and indices and preferrably allowing to "mutate" those indices e.g.
allowing some convenient lenses to reorder sheets.
Probably I want some magic from lenses not knowing them good enough :)
But thanks for the idea


Reply to this email directly or view it on GitHub
#16 (comment).

from xlsx.

qrilka avatar qrilka commented on July 17, 2024

agree

from xlsx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.