Macros not saved? #361

Closed
opened 2016-02-01 15:24:26 +00:00 by TennisVisuals · 4 comments
TennisVisuals commented 2016-02-01 15:24:26 +00:00 (Migrated from github.com)

I see in the README:

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

I see the formula present in the cell object, but it is not present when I save the workbook:
{t: "s", f: "IF(A80="","",IF(K80=1,I$1,I$2))", v: "", h: "", w: ""}

Is this not supported or is there an option that I'm missing?

Thanks!

I see in the README: `The raw data is the only thing guaranteed to be saved. Formulae, formatting, and other niceties may not be serialized (pending CSF standardization)` I see the formula present in the cell object, but it is not present when I save the workbook: {t: "s", f: "IF(A80="","",IF(K80=1,I$1,I$2))", v: "", h: "", w: ""} Is this not supported or is there an option that I'm missing? Thanks!
SheetJSDev commented 2017-03-25 16:24:13 +00:00 (Migrated from github.com)

@TennisVisuals the overarching problem is that every feature seems to have different representations across the Excel formats. Take formulae, there are 4 different representations as mentioned in https://github.com/SheetJS/js-xlsx#formulae : "A1-style strings" like the example you gave, "RC-style strings" where the references are RC based rather than A1 based, "BIFF Parsed Formulae" which are a preprocessed formula format used in XLSB and XLS, and the OpenFormula standard.

At this point formulae should be saved on export. We don't have a complete macro story yet, as that requires support for macrosheets as well as parsing and manipulating the VBA

@TennisVisuals the overarching problem is that every feature seems to have different representations across the Excel formats. Take formulae, there are 4 different representations as mentioned in https://github.com/SheetJS/js-xlsx#formulae : "A1-style strings" like the example you gave, "RC-style strings" where the references are RC based rather than A1 based, "BIFF Parsed Formulae" which are a preprocessed formula format used in XLSB and XLS, and the OpenFormula standard. At this point formulae should be saved on export. We don't have a complete macro story yet, as that requires support for macrosheets as well as parsing and manipulating the VBA
davidpfahler commented 2017-05-26 10:16:27 +00:00 (Migrated from github.com)

Unfortunately, I just ran into this as well. Macros support would be amazing.

Unfortunately, I just ran into this as well. Macros support would be amazing.
SheetJSDev commented 2017-11-20 02:39:42 +00:00 (Migrated from github.com)

To expose the VBA blob when reading a file, set the option bookVBA:true in the read function. To write the VBA blob to a file, set the option bookVBA:true in the write function. When feeding a VBA blob from a different workbook, the code names must be aligned. The relevant parts are explained in the README

To expose the VBA blob when reading a file, set the option `bookVBA:true` in the read function. To write the VBA blob to a file, set the option `bookVBA:true` in the write function. When feeding a VBA blob from a different workbook, the code names must be aligned. The relevant parts are explained [in the README](https://docs.sheetjs.com/#vba-and-macros)
creativityjuice commented 2018-02-22 11:19:16 +00:00 (Migrated from github.com)

Hi there,
Do you have a solution for writing "BIFF Parsed Formulae" in a xls file since March 2017 ?
I have a xls that I parse, in which I want to add stuff in cell, and finally write the new xls. It works almost perfectly when I write a xlsx, but with a xls the formula disappeared.
Is there a way to write formula in a xls with your lib ?
Anyway, thanks a lot for your job on this lib ! 👌

Hi there, Do you have a solution for writing "BIFF Parsed Formulae" in a xls file since March 2017 ? I have a xls that I parse, in which I want to add stuff in cell, and finally write the new xls. It works almost perfectly when I write a xlsx, but with a xls the formula disappeared. Is there a way to write formula in a xls with your lib ? Anyway, thanks a lot for your job on this lib ! :ok_hand:
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#361
No description provided.