Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delimiter instead of spaces #1

Open
akelmj opened this issue Feb 8, 2021 · 0 comments
Open

Add delimiter instead of spaces #1

akelmj opened this issue Feb 8, 2021 · 0 comments

Comments

@akelmj
Copy link

akelmj commented Feb 8, 2021

The WS constant add spaces using the addSpaces method in lib.js line 3.

convert the WS to a parameter and send to it the Delimiter so for example if you assign '\t' to it you can copy an past the result to Excel without any issue.

change file lib.js lines 19,20,21 to:

  • this is a basic example , the best way is to convert the WS constant to parater.

const getRow = function (headers, startPoints, isHeaderRow, obj) {
let row = ES;
headers.forEach((header, index) => {
const value = isHeaderRow ? header : obj[header];
row += typeof value === 'object' ? removeDoubleQuotes(JSON.stringify(value)) : value;
//const spaceCount = startPoints[index + 1] - row.length;
//row = addSpaces(row, spaceCount);
row += '\t';
});
return row;
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant