Closed invisal closed 1 year ago
Allow user to copy selected rows into the clipboard and able to paste it on Excel.
You can follow the "Copy as JSON" implementation
https://github.com/invisal/query-master/blob/main/src/renderer/screens/DatabaseScreen/QueryResultViewer/useDataTableContextMenu.tsx#L71
I think it is possible to do it as this answer: https://stackoverflow.com/questions/60698115/how-to-copy-a-javascript-2d-array-to-clipboard-to-paste-it-in-excel
You can use getDisplayableFromDatabaseRows to stringify to make result string-friendly https://github.com/invisal/query-master/blob/main/src/libs/TransformResult.ts#L84
getDisplayableFromDatabaseRows
Allow user to copy selected rows into the clipboard and able to paste it on Excel.
How to implement this
You can follow the "Copy as JSON" implementation
https://github.com/invisal/query-master/blob/main/src/renderer/screens/DatabaseScreen/QueryResultViewer/useDataTableContextMenu.tsx#L71
I think it is possible to do it as this answer: https://stackoverflow.com/questions/60698115/how-to-copy-a-javascript-2d-array-to-clipboard-to-paste-it-in-excel
You can use
getDisplayableFromDatabaseRows
to stringify to make result string-friendly https://github.com/invisal/query-master/blob/main/src/libs/TransformResult.ts#L84