Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'A' Column not shown when it is blank #35

Closed
Alex-ley opened this issue May 4, 2021 · 3 comments · Fixed by #44
Closed

'A' Column not shown when it is blank #35

Alex-ley opened this issue May 4, 2021 · 3 comments · Fixed by #44
Assignees
Labels
bug Something isn't working

Comments

@Alex-ley
Copy link

Alex-ley commented May 4, 2021

I am not sure if this is a SheetJS or SlickGrid thing, or possibly your wrapper?

But if the 'A' Column is blank it is not shown.

It's not a big deal but it is weird when you always expect an Excel sheet to show columns A through M and rows 1 to N?

The plugin is awesome btw congrats and thanks. If this is an easy fix and if it's easy for me to get my head around your code, I could potentially submit a PR.
image

@quigleyj97
Copy link
Owner

Oh man, thanks for reporting this! My first guess is that this is a rendering issue with SlickGrid, but the column sizes are given by SheetJS. Does this happen exclusively in sheets where all the first column cells are empty? Or is the first column resized as well? I'll see if I can repro this tonight.

@quigleyj97 quigleyj97 self-assigned this Jul 17, 2021
@quigleyj97 quigleyj97 added the bug Something isn't working label Jul 17, 2021
@quigleyj97
Copy link
Owner

Able to reproduce this locally-

Screen Shot 2021-07-17 at 3 51 44 PM

vs the expected:

Screen Shot 2021-07-17 at 3 52 26 PM

Oddly, the contents of the "A" column are rendered as the "B" column, and inspecting the DOM the "A" column is straight up not present (suggesting an issue in the Model translating between SheetJS and SlickGrid's viewmodels). Investigating further

@quigleyj97
Copy link
Owner

In my test sheet, it looks like SheetJS is trying to be clever and returning a range not inclusive of the first cell/column:

https://github.com/quigleyj97/jupyterlab-spreadsheet/blob/main/src/model.ts#L94

Most of the GridWidget assumes that the letter column names and column indicies are interchangable, which would be why the expected "B" column data is missing.

Easiest fix is to update SpreadsheetModel#getColumnConfig() to always start from the 0th column, instead of the start of the sheet range.

quigleyj97 added a commit that referenced this issue Jul 17, 2021
This reproduces a blank-column issue seen in issue #35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants