Edited HTML content is not exporting as XSLX, but exporting old data #2137

Closed
opened 2020-10-09 14:42:09 +00:00 by ursnj · 1 comment
ursnj commented 2020-10-09 14:42:09 +00:00 (Migrated from github.com)

Not getting edited values in XLSX, but getting old data.

Not getting edited values in XLSX, but getting old data.
SheetJSDev commented 2021-09-17 00:25:13 +00:00 (Migrated from github.com)

Logical issue with contenteditable and attributes https://github.com/SheetJS/sheetjs/blob/master/bits/79_html.js#L83 . The logic should check o.editable first, only writing the t / v / z attributes if o.editable is not set. So it is something like:

			sp.id = (o.id || "sjs") + "-" + coord;
			if(o.editable) w = '<span contenteditable="true">' + w + '</span>';
			else {
				sp.t = cell && cell.t || 'z';
				if(sp.t != "z") { sp.v = cell.v; if(cell.z != null) sp.z = cell.z; }
			}
Logical issue with contenteditable and attributes https://github.com/SheetJS/sheetjs/blob/master/bits/79_html.js#L83 . The logic should check `o.editable` first, only writing the `t` / `v` / `z` attributes if `o.editable` is not set. So it is something like: ```js sp.id = (o.id || "sjs") + "-" + coord; if(o.editable) w = '<span contenteditable="true">' + w + '</span>'; else { sp.t = cell && cell.t || 'z'; if(sp.t != "z") { sp.v = cell.v; if(cell.z != null) sp.z = cell.z; } } ```
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#2137
No description provided.