Our blazing fast Grid component built with pure JavaScript


Post by proteams-kaan »

Is it possible to give an example project setup for using ExcelExporter in angular?

I've added zipcelx.js to the scripts in angular.js file.
But no matter what I try for the ExcelExporter.umd.js I can't get it registered with the GridFeatureManager.

I'm using bryntum-grid as suggested via a local package reference in package.json to the build directory in the distribution.

Any help would be much appreciated.

Br,
Kaan.

Post by proteams-kaan »

Minor related issue: ExcelExporter relies on ObjectHelper. ObjectHelper is not exported in d.ts files

Post by proteams-kaan »

For what it's worth I've managed to get this working.

For anyone interested, the modifications I had to make are outlined here: https://gist.github.com/kaandok/e54f05e6f6639befae993c724e3818a0

I don't have any doubts about angular.json modification for zipcelx and registering the feature with the feature manager somewhere.

But I'd appreciate if someone from Bryntum team takes a look at ExcelExporter.ts and maybe comment on whether the additional field declarations are actually needed or even whether there is a more elegant way to achieve the results without creating a ts file?

It'd also be great if we could get the ObjectHelper declared properly in both grid.d.ts and grid.umd.d.ts files in build artifacts.

Post by pmiklashevich »

Hello Kaan,

Sorry for the delay. I've fixed the d.ts file. ObjectHelper will be there in the next nightly build and next release. About copying ExcelExporter completely to create *.ts file, I don't think it's a good idea. It's better to have ExcelExporter.d.ts file and import it as is. Otherwise it will be hard to support the code base if we decide to change something in the sources. I've created a feature request for that: https://app.assembla.com/spaces/bryntum/tickets/8926-should-be-possible-to-use-excelexporter-with-typescript/details

Best,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post by proteams-kaan »

Hi, the linked issue is closed as won't fix.

Are there any plans to make the excelexporter part of the core?
The dependency to zipxcel.js isn't much of an issue as long as it's properly documented imho.

The workaround I posted requires disabling optimizations in angular builds.
(optimization: false is needed in angular.json)

Is there an official way to use the exporter in angular apps?

Post by sergey.maltsev »

Hi, proteams-kaan!

Yes, we have a plan to release it in 2.3.
It is already available nightly builds suffixed with -next.

Post Reply