Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I need the help from you all for table copy feature on a Reactjs web app.
There have a C# software in which if I copy Excel cells range and paste there to software, it will show the cells with exact text and style
On our web app, we have a table and a button COPY. Requirement is: after click copy => paste to the C# software, it will behave exactly the same to the case copying from excel
The C# software is a 3rd party tool, and all I know about its implementation for "pasting" feature is: it recognizes excell range by checking csv format from clipboard data
`if(Clipboard.ContainsData(DataFormats.CommaSeparatedValue)`
What I have tried in webapp is:
https://codesandbox.io/s/reverent-galois-tgcg6t?file=/src/App.js
User copy Excel range => paste to the input box => web handle paste event by read all clipboard data => I dont see data of csv format there. I only see text/plain, text/html and image/png
User Click Imitate Copy button => pushing all data (read in #1) to clipboard => user paste to a dummy C# software => the If
statement of C# return false
My questions are:
Is that actually csv not supported in browser clipboard (which explain why when paste excel to web, i dont see clipboard csv data)
if it's supported, anyone can please point me out how to put csv to clipboard
Thanks in advance!
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.