vbaraw field is NULL even when bookVBA property is set to true #348

Closed
opened 2016-01-12 20:39:53 +00:00 by sfdcale · 0 comments
sfdcale commented 2016-01-12 20:39:53 +00:00 (Migrated from github.com)
    <script>
        sforce.connection.query(
            "SELECT Id, Body FROM StaticResource WHERE Name = 'Sample_file'", 
            { onSuccess : handleUpdate,
              onFailure : handleFailure });
        function handleUpdate(result) {
            result = result.getArray('records');
            //console.log(result[0].Body);
            var workbook = XLSX.read(result[0].Body, {type:"base64",bookVBA:true});
            console.log(workbook.vbaraw);
        }
    </script>

Here, I am reading Excel file "Sample_file.xlsm" and trying to get the vba code present in the file by passing option parameter bookVBA as true but it returns null.

Note: It is reading the contents of the excel perfectly but not the vba code.

Could somebody help me on this? I don't know what is wrong I am doing here. Thanks!

``` javascript <script> sforce.connection.query( "SELECT Id, Body FROM StaticResource WHERE Name = 'Sample_file'", { onSuccess : handleUpdate, onFailure : handleFailure }); function handleUpdate(result) { result = result.getArray('records'); //console.log(result[0].Body); var workbook = XLSX.read(result[0].Body, {type:"base64",bookVBA:true}); console.log(workbook.vbaraw); } </script> ``` Here, I am reading Excel file "Sample_file.xlsm" and trying to get the vba code present in the file by passing option parameter bookVBA as true but it returns null. <b>Note</b>: It is reading the contents of the excel perfectly but not the vba code. Could somebody help me on this? I don't know what is wrong I am doing here. Thanks!
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#348
No description provided.