fix: issue:4
This commit is contained in:
parent
4ff404f2c8
commit
3e8d553a58
@ -2,6 +2,11 @@
|
||||
|
||||
All notable changes to the "sheetjs-demo" extension will be documented in this file.
|
||||
|
||||
## [0.1.2]
|
||||
|
||||
### Fixed
|
||||
- Fixed row count issues after reopening files or switching worksheets, and corrected range calculation when sheets load from cache.
|
||||
|
||||
## [0.1.1]
|
||||
- Added control over #rows x #columns to show
|
||||
- Added control over #worbooks and #worksheets to cache
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"author": "Asadbek Karimov <contact@asadk.dev>",
|
||||
"publisher": "asadbek",
|
||||
"icon": "img/logo.png",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://git.sheetjs.com/asadbek064/sheetjs-vscode-extension/issues"
|
||||
|
||||
@ -262,19 +262,18 @@ export class ExcelEditorProvider implements vscode.CustomReadonlyEditorProvider<
|
||||
// setTimeout to ensure loading message gets displayed
|
||||
setTimeout(async () => {
|
||||
try {
|
||||
const sheet = workbook.Sheets[sheetName];
|
||||
|
||||
// always calculate range info
|
||||
const range = sheet['!ref'] || '';
|
||||
const rangeInfo = parseRange(range);
|
||||
|
||||
let sheetHtml: string;
|
||||
let rangeInfo: any = null;
|
||||
|
||||
// check if this page is already cached
|
||||
if (this.cache.hasSheet(cacheKey)) {
|
||||
sheetHtml = this.cache.getSheet(cacheKey)!;
|
||||
} else {
|
||||
const sheet = workbook.Sheets[sheetName];
|
||||
|
||||
// get the range of the sheet (e.g., A1:Z100)
|
||||
const range = sheet['!ref'] || '';
|
||||
rangeInfo = parseRange(range);
|
||||
|
||||
if (!rangeInfo) {
|
||||
sheetHtml = '<p>No data in this sheet</p>';
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user