Comments (3)
@fegu could you show your GHCi output?
Mine shows 5 columns for both rows:
λ> map (\c -> (Map.!) lx (2,c)) [2..6] -- this is ok
[Cell {_cellStyle = Just 2, _cellValue = Just (CellDouble 42254.0)},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "5504542218")},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "SYSTOR VEST AS")},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "5504542218")},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "SYSTOR VEST AS")}]
λ> map (\c -> (Map.!) lx (5,c)) [2..6] -- column is missing
[Cell {_cellStyle = Just 2, _cellValue = Just (CellDouble 42254.0)},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "5504542218")},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "SYSTOR VEST AS")},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "41109511")},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "EIRIK MAGNUSSEN")}]
from xlsx.
Hi, yes, there are 5 columns, but the content I get is wrong. One column is missing and all other data for that row shifted left to fill the void.
> map (\c -> (Map.!) lx (2,c)) [2..6] -- this is ok
[Cell {_cellStyle = Just 2, _cellValue = Just (CellDouble 42254.0)},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "5504542218")},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "SYSTOR VEST AS")},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "5504542218")},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "SYSTOR VEST AS")}]
> map (\c -> (Map.!) lx (5,c)) [2..6]
[Cell {_cellStyle = Just 2, _cellValue = Just (CellDouble 42254.0)},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "5504542218")},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "SYSTOR VEST AS")},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "EIRIK MAGNUSSEN")},Cell {_cellStyle = Nothing, _cellValue = Just (CellText "Faste priser")}]
Since you get correct results, while I don't, I thought about comparing versions. I am using GHC7.8.4 and xlsx-0.1.1 on Windows. However, it seems this bug is fixed in xlsx-0.1.1.1 as I get the correct (your) result now as well. Before you close the issue, perhaps look into why?
from xlsx.
Thanks @fegu
It appears that there was a bug with empty shared strings, i.e. your file contains the following entry:
<si><t/></si>
And as rich string support required some refactoring of shared strings parsing code this bug was also fixed as a side effect.
from xlsx.
Related Issues (20)
- Depend on microlens instead of lens? HOT 3
- NonEmpty list of worksheets HOT 3
- How to insert a row HOT 4
- Add writing support for large excell files (streaming?) HOT 10
- 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
- Cut a release with GHC 9.6 support HOT 5
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.