Skip to content

Replace loadData from ProfilePage with new parser #44

@nerocui

Description

@nerocui

The current method use xlsx.utils.sheet_to_json() which misses data when the cell is empty.
The new parseSheet function accept a csv variable and returns rich data about the result. Using it also makes the ProfilePage more loosely coupled with parser logic.
In order to use it, have loadData call sheet_to_csv instead and pass the csv to parseSheet in recordParser.js. The result will be returned and should be passed to this.props.importRecords() to push to redux. Then navigate to '/preview'.

Helper methods will also needed to be implemented. parseHeader and parseCell in recordParser.js

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions