Serialize Comments #183

Closed
opened 2015-02-25 23:36:12 +00:00 by aravindkoneru · 4 comments
aravindkoneru commented 2015-02-25 23:36:12 +00:00 (Migrated from github.com)

I'm running into a problem making a cell with a formula. As far as I know, the way that I'm defining the formula within the cell object is fine and the cell does write to the file when there is a v value.

Here's my cell:

var cell = {
v: 0,
f: 'A2*B2'
t: 'n'
};

Here's how I am printing out the data in the cells:

var book = xlsx.readFile("blah2.xlsx");
var sheet = book.Sheets["test"];
console.log(sheet);

Although the cell gets written to "test" locally before being written to the file, the cell simply disappears from the spreadsheet when it is written. If there is a v value for the cell, the cell appears, but the formula disappears.

I also found that there is a similar problem with the c value in the cell, where the cell will disappear if not given a v value.

So my question is: How do I write a formula or comment to a cell and not have it disappear?

I'm running into a problem making a cell with a formula. As far as I know, the way that I'm defining the formula within the cell object is fine and the cell does write to the file when there is a v value. Here's my cell: > var cell = { > v: 0, > f: 'A2*B2' > t: 'n' > }; Here's how I am printing out the data in the cells: > var book = xlsx.readFile("blah2.xlsx"); > var sheet = book.Sheets["test"]; > console.log(sheet); Although the cell gets written to "test" locally before being written to the file, the cell simply disappears from the spreadsheet when it is written. If there is a v value for the cell, the cell appears, but the formula disappears. I also found that there is a similar problem with the c value in the cell, where the cell will disappear if not given a v value. So my question is: How do I write a formula or comment to a cell and not have it disappear?
ryangallen commented 2015-03-30 15:17:30 +00:00 (Migrated from github.com)

Bumping this issue.

According to the docs: "The raw data is the only thing guaranteed to be saved. Formulae, formatting, and other niceties may not be serialized (pending CSF standardization)"

Is there any word on progress for this topic? Has anyone found a workaround?

Bumping this issue. According to the docs: "The raw data is the only thing guaranteed to be saved. Formulae, formatting, and other niceties may not be serialized (pending CSF standardization)" Is there any word on progress for this topic? Has anyone found a workaround?
ryangallen commented 2015-04-01 13:18:52 +00:00 (Migrated from github.com)
Duplicate issue: https://github.com/SheetJS/js-xlsx/issues/152#issuecomment-87772442
SheetJSDev commented 2017-03-21 17:26:42 +00:00 (Migrated from github.com)

The formulae should be written to XLSX as of 0.9.4, comments are not yet written to file.

The formulae should be written to XLSX as of 0.9.4, comments are not yet written to file.
SheetJSDev commented 2017-04-02 06:52:37 +00:00 (Migrated from github.com)

@ryangallen we pushed the feature to the master branch and it will be in the next version cut (aiming for some time in the next 48 hours or so).

https://sheetjs.gitbooks.io/docs/#cell-comments is the relevant part of the docs (it's also in the README but I like the page with the sidebar). As we settle on representations we will add more subsections to the README.

@ryangallen we pushed the feature to the master branch and it will be in the next version cut (aiming for some time in the next 48 hours or so). https://sheetjs.gitbooks.io/docs/#cell-comments is the relevant part of the docs (it's also in the README but I like the page with the sidebar). As we settle on representations we will add more subsections to the README.
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#183
No description provided.