You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is due to a change I implemented to solve issue #686, but honestly I believe this shouldn't have worked to begin with.
When you use parameters startCell and endCell you're supposed to give a full reference for the cells,
e.g. A1 or ALL23
@shps951023 Am I wrong to assume this was always the intended behaviour?
@karczk-dnv yes, it's a breaking change, we will update release notes.
you can specific the cell number to resolve the issue.
please feel free to feedback.
@michelebastione@shps951023 I agree with you that if there is cell in the variable name, the address should also contains a number.
However this function is still misleading. Let's forget about everything for now and just look at the definition. My reasoning:
var rows = MiniExcel.QueryRange(path, startCell: "A1", endCell: "J1");
It should return one row: A1-J1
var rows = MiniExcel.QueryRange(path, startCell: "A2", endCell: "J2");
It should return one row: A2-J2
var rows = MiniExcel.QueryRange(path, startCell: "A5", endCell: "J6");
It should return two rows: A5-{the last column, could be more than J}5, A6-J6
Actual:
var rows = MiniExcel.QueryRange(path, startCell: "A1", endCell: "J1");
All rows are returned, A1-J1, A2-J2 etc.
var rows = MiniExcel.QueryRange(path, startCell: "A2", endCell: "J2");
One row is returned:, A2-J2
This is not consistent, it looks like a bug. I'm afraid I'll migrate to this and then it'll get fixed and I'll be surprised again :)
Proposal:
Use cells but respect it :) That will be a breaking change, again. var rows = MiniExcel.QueryRange(path, startCell: "A1", endCell: "J1");
and add new overload (because the cells themselves do not fulfill all the scenarios)
var rows = MiniExcel.QueryRange(path, startRowNumber: 2, endRowNumber: 500, startColumn: "A", endColumn: "J");
where endRowNumber is nullable (null = take to the end what is there)
where endColumn is nullable (null = take to the end what is there)
@karczk-dnv Thank you for your feedback. I agree that the logic should be made more consistent by making MiniExcel.QueryRange return a single row when both startCell and endCell's number is 1. I'm not sure about the overloads, but it can be done. Ultimately it's @shps951023 's decision.
var rows = MiniExcel.QueryRange(path, startCell: "A5", endCell: "J6");
It should return two rows: A5-{the last column, could be more than J}5, A6-J6
In pratice it is:
two rows: A5-J5, A6-J6
That could be misleading as well (K5, L5 etc. are skipped). I'm trying to help if you're going to work on the next version.
My scenario that I am currently trying to solve is:
I want to parse all rows, but limit columns to 1000. I guess that only the new overload would solve it.
When you fix scenario: var rows = MiniExcel.QueryRange(path, startCell: "A1", endCell: "J1");
then I need to use some dummy number: var rows = MiniExcel.QueryRange(path, startCell: "A1", endCell: "ALL100000");
not the best option...
When you fix scenario: var rows = MiniExcel.QueryRange(path, startCell: "A5", endCell: "J6");
then there is not workaround for me (at least using QueryRange)
I think we can add new overload for column : var rows = MiniExcel.QueryRange(path, startRowNumber: 2, endRowNumber: 500, startColumn: "A", endColumn: "J");
And we need to fix current version startCell: "A5", endCell: "J6" issue.
I think that the fixes and new api methods brought in #797 combined with the methods provided in the new helper class CellReferenceConverter are sufficient for considering the issue solved.
Activity
shps951023 commentedon Apr 16, 2025
It looks like 1.38 bug, because miniexcel QueryRange doesn't support
ALLkeyword.But you can use Query, its default support all columns.
karczk-dnv commentedon Apr 16, 2025
@shps951023 what do you mean by keyword? :)
ALLis just the next "excel letter" afterALK1 - A
2 - B
100 - CV
1000 - ALL
1001 - ALM
By using
ALLI limit columns to 1000.michelebastione commentedon Apr 16, 2025
I think this is due to a change I implemented to solve issue #686, but honestly I believe this shouldn't have worked to begin with.
When you use parameters
startCellandendCellyou're supposed to give a full reference for the cells,e.g. A1 or ALL23
@shps951023 Am I wrong to assume this was always the intended behaviour?
shps951023 commentedon Apr 17, 2025
@karczk-dnv 😅 I got the point.
@michelebastione Because I never use QueryRange, but for me, it should be
A1 or ALL23notA or ALL. (the name hascell)shps951023 commentedon Apr 17, 2025
@karczk-dnv yes, it's a breaking change, we will update release notes.
you can specific the cell number to resolve the issue.
please feel free to feedback.
[-]Max column - breaking change[/-][+]QueryRange Max column - breaking change[/+]karczk-dnv commentedon Apr 18, 2025
@michelebastione @shps951023 I agree with you that if there is cell in the variable name, the address should also contains a number.
However this function is still misleading. Let's forget about everything for now and just look at the definition. My reasoning:
var rows = MiniExcel.QueryRange(path, startCell: "A1", endCell: "J1");It should return one row:
A1-J1var rows = MiniExcel.QueryRange(path, startCell: "A2", endCell: "J2");It should return one row:
A2-J2var rows = MiniExcel.QueryRange(path, startCell: "A5", endCell: "J6");It should return two rows:
A5-{the last column, could be more than J}5,A6-J6Actual:
var rows = MiniExcel.QueryRange(path, startCell: "A1", endCell: "J1");All rows are returned,
A1-J1,A2-J2etc.var rows = MiniExcel.QueryRange(path, startCell: "A2", endCell: "J2");One row is returned:,
A2-J2This is not consistent, it looks like a bug. I'm afraid I'll migrate to this and then it'll get fixed and I'll be surprised again :)
Proposal:
Use cells but respect it :) That will be a breaking change, again.
var rows = MiniExcel.QueryRange(path, startCell: "A1", endCell: "J1");and add new overload (because the cells themselves do not fulfill all the scenarios)
var rows = MiniExcel.QueryRange(path, startRowNumber: 2, endRowNumber: 500, startColumn: "A", endColumn: "J");where
endRowNumberis nullable (null= take to the end what is there)where
endColumnis nullable (null= take to the end what is there)What do you think about it?
michelebastione commentedon Apr 18, 2025
@karczk-dnv Thank you for your feedback. I agree that the logic should be made more consistent by making
MiniExcel.QueryRangereturn a single row when bothstartCellandendCell's number is 1. I'm not sure about the overloads, but it can be done. Ultimately it's @shps951023 's decision.karczk-dnv commentedon Apr 18, 2025
Just you to know, I just tested this case:
var rows = MiniExcel.QueryRange(path, startCell: "A5", endCell: "J6");It should return two rows:
A5-{the last column, could be more than J}5,A6-J6In pratice it is:
two rows:
A5-J5,A6-J6That could be misleading as well (
K5,L5etc. are skipped). I'm trying to help if you're going to work on the next version.My scenario that I am currently trying to solve is:
I want to parse all rows, but limit columns to 1000. I guess that only the new overload would solve it.
When you fix scenario:
var rows = MiniExcel.QueryRange(path, startCell: "A1", endCell: "J1");then I need to use some dummy number:
var rows = MiniExcel.QueryRange(path, startCell: "A1", endCell: "ALL100000");not the best option...
When you fix scenario:
var rows = MiniExcel.QueryRange(path, startCell: "A5", endCell: "J6");then there is not workaround for me (at least using
QueryRange)shps951023 commentedon Apr 25, 2025
I think we can add new overload for column :
var rows = MiniExcel.QueryRange(path, startRowNumber: 2, endRowNumber: 500, startColumn: "A", endColumn: "J");And we need to fix current version
startCell: "A5", endCell: "J6"issue.michelebastione commentedon Jun 2, 2026
I think that the fixes and new api methods brought in #797 combined with the methods provided in the new helper class
CellReferenceConverterare sufficient for considering the issue solved.karczk-dnv commentedon Jul 3, 2026
@michelebastione Thanks, I tested
2.0.0-preview.4and it solves my case: