(Mar-05-2020, 09:14 PM)OAP Wrote: Let me try to clarify the process.I understood the process perfectly fine from the first time. However your question is perfect example of so called XY problem.
The problem with your approach is you try to put a list of lists in the pyperclip. So you save to csv file, which you try to read into clipboard. Instead of writting to csv file, you can just create single string from the list of list and put that str into clipboard (achieving the same result what you will get by reading the csv in the clipboard).
Now, as we try to explain to you using clipboard is unnecessary complication.
Using your current code to read from DB which gives you list of lists, you can then use this list of lists to write directly to excel/calc file.
one library for working with ods files is pexcel-ods3: https://github.com/pyexcel/pyexcel-ods3
you can also use openpyxl to work with xslx file
you can also use pandas for reading from db and/or writing to excel/calc file
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs