I have a table where each cell is a textfield
. On clicking of a button, I want to collect the values from this table, row by row, and write it in a csv file.
For example, consider the below table.
I want to create a file like
text.txt
, with the following content:
abc,def,ghi
jkl,mno,pqr
uvw,xyz,123
I know we can't use JavaScript in HTML to create and write into a file due to a lot of permission issues, so I want to extract the values and pass an array to a python script that will create the file.
I had a look at this question, but there, the onclick function is purely calling the python script. I need to first extract the values using javascript, and then call the python script. How do I proceed?