Open edtguy opened 6 years ago
I think you're right about the missing metadata. This is almost certainly a bug somewhere. Either I am missing a required attribute in the files the excel4node library is generating or SiSense Elasticube Manager compare is looking for something that is required when it should be using a default value.
I can run through the OOXML docs and double check that I'm adding all required props. This one might be a difficult one to troubleshoot since I won't have a way to replicate.
@edtguy, do the SiSense Elasticube Manager logs have any indication about what that "Object reference" might be pointing to?
@natergj I will check the logs, but they are notoriously obtuse.
@natergj The log has a combination of readable and non-readable characters. Here is the relevant portion:
`</ElastiCube.ManagementService.Process.TrackingItemEvent>
</ElastiCube.ManagementService.Process.TrackingExceptionEvent>
</ElastiCube.ManagementService.Process.TrackingExceptionEvent>
</ElastiCube.ManagementService.Process.TrackingExceptionEvent> `
I thought this might be helpful. I just ran a simple test, creating a two column, two row spreadsheet. The resulting file (3k) does not load into SiSense, but if I open and save the file in Excel, that file (9k) is readable. If you recreate this, will you be able to tell what it is that Excel is adding to the file?
"use strict"
const xl = require('excel4node')
let wb = new xl.Workbook()
let ws = wb.addWorksheet('Metadata Test')
ws.cell(1,1).string('Column A')
ws.cell(1,2).string('Column B')
ws.cell(2,1).number(42)
ws.cell(2,2).string('Universal Answer')
wb.write('MetadataTest.xlsx')
Update: I just loaded and tested another package, exceljs. It has the same issue. Resulting file does not load into SiSense unless first opened and saved in Excel.
MS Excel tends to add a LOT of stuff that is not necessary for the spec. I'm currently working on a 2.0.0 rewrite which should make it easier to add a compatibility setting when creating workbooks. I'd want to make sure that is an optional mode that can be turned on as it does increase file size. I'll let you know when I have a beta up so you can try it to see if that fixes the issue you're seeing.
Thank you @natergj I'll look forward to testing it when ready, as this library has an easy to understand api. In the meantime, the package xlsx, does generate a spreadsheet file readable by SiSense, and yes, it is significantly larger. It's also more cumbersome to set up.
Am I missing a step before writing the Excel file, to make it fully Excel compatible? The file can be opened in Excel with no problem, but when I attempt to read the file I have created with the SiSense Elasticube Manager's import feature, it generates an error with the message, "Object reference not set to an instance of an object." If instead, I first open the file in Excel, do nothing but click on the save icon and exit, I notice the file size has increased, and the resultant file can now be read by SiSense. Since the file is intended to be part of an automated process, opening the file in Excel and saving it is not an optimal step. Below are the relevant excel4node statements. If there is an additional step, e.g. "finalize", that I've missed, please let me know. Thanks.
p.s. It may also be worth noting that when I compare the two files with Beyond Compare, it identifies both as MS Excel Workbooks, and reports 17277 same row(s), though the original file has 1,538,233 bytes and the file opened, then saved in Excel has 1,900,497 bytes, so I assume there is some metadata difference.