Use Spread Engine for Data Transformations

Posted by: kyrian.willis on 18 November 2022, 12:22 am EST

  • Posted 18 November 2022, 12:22 am EST

    I’m interested in setting up a system where I can take a portion of a data set, use the spread js front end to apply transformations (pivot, calculations, etc) and get transformation json. Then, apply this transformation to the original data set (could be millions of rows) on the backend to create a new data set. This would also allow my system to apply this transformations to new versions of this data set in the future. Is it possible to use Spread in this way, to fed it a data set and transformation and get a new data set spit out on the other side without a UI in the middle?

  • Posted 20 November 2022, 2:41 pm EST

    Hi,

    Yes, you could use SpreadJS in this.

    You could SpreadJS on frontend and GCExcel at back end. let me explain how.

    I can take a portion of a data set, use the spread js front end to apply transformations (pivot, calculations, etc) and get transformation json

    these steps can be performed using SpreadJS once you are done with the customization. You could export or save the JSON using spredJS API which is toJSON method.

    toJSON method: https://www.grapecity.com/spreadjs/api/classes/GC.Spread.Sheets.Workbook#tojson

    pivot table demo: https://www.grapecity.com/spreadjs/demos/features/pivot-table/overview/purejs

    apply this transformation to the original data set (could be millions of rows) on the backend to create a new data set.

    Now You have JSON from the SpreadJS you could send this JSON to the backend and use GCExcel to load the JSON that came from the frontend. GC Excel also provides the toJSON and fromJSON methods. Please refer to the following code snippet and let me know if you face any issues.

    var workbook = new Workkbook();

    workbook.fromJSON(JSONCameFromFrontend);

    GCEXCEL API:

    fromJSON: https://www.grapecity.com/documents-api-excel/docs/online/GrapeCity.Documents.Excel~GrapeCity.Documents.Excel.Workbook~FromJson(String,DeserializationOptions).html

    I hope this clarifies the issue

    Regards,

    Avinash

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels