QtXlsxWriter Save protected file with passeword - xlsxwriter

how can I save my xlsx file with protection and passeword using QtXlsxWriter ?
https://github.com/dbzhang800/QtXlsxWriter
Kind regards
Philippe

Related

How can you save a TensorSliceDataset into a path?

I'm trying to save a TensorSliceDataset as a file so that I can transfer it between computers, but simply using .save(filepath) doesn't work.
Instead of saving the TensorSliceDataset, I saved the data I converted into the TensorSliceDataset instead.

How do I create a *.zpl file using zimpl?

how do I create a file of the form .zpl to be used with SCIP? Do I write my problem in a notepad and save it as .zpl?
Yes. That is exactly what you have to do.

In kettle use text file input read csv file from a tar.gz file but it didn't worked. Where it might be wrong?

I have a csv file that is tared and zipped. So I have test.tar.gz.
I would like, through text file input, read csv file.
I try this tar:gz:file://C:/test/test.tar.gz!/test.tar! use wildcard like ".*\.csv".
But it sometime can't read success.
It throws Exception
org.apache.commons.vfs.FileNotFolderException:
Could not list the contents of
"tar:gz:file:///C:/test/test.tar.gz!/test.tar!/"
because it is not a folder.
I use windows8.1, pdi 5.2
Where it might be wrong?
For a compressed file csv reading, "Text File Input" step in Pentaho Kettle only supports the first files inside the compressed folder(either in Zip/GZip file). Check the Pentaho Wiki in the compression section.
Now for your issue, try removing the wildcard entry since only the first file inside the zip/gzip file will be read. (as explained above)
I have placed a sample code containing both reading zip and gzip files. Check it here.
Hope it helps :)

Load xlsx file into Pig

Is there any way to load .xlsx files into Pig? I need to perform an operation in PIG using the excel file [.xlsx] as input, but i couldn't find any built-in functions available for this purpose.?
Any help to achieve this would be appreciable.
Thanks,
Try this,
First convert the xlsx file into csv then do the following,
REGISTER Location\to\piggybank.jar
Data = load 'Location\to\csv\file' using org.apache.pig.piggybank.storage.CSVExcelStorage(',', 'NO_MULTILINE', 'NOCHANGE', 'SKIP_INPUT_HEADER') as (col1,col2,..);
It (CSVExcelStorage) worked for me. Hope it works.
No, but if your excel has only one sheet then you can try to use CSVExcelStorage
How to use? check for pig example in below link
http://pig.apache.org/docs/r0.9.1/api/org/apache/pig/piggybank/storage/CSVExcelStorage.html

How to ForceDownload a file in OPENERP

I'm generating a pdf and storing it on my server using Openerp.Can any one please tell me how to Force Download that file using Openerp.If can upload the pdf using fields.binary and download it automatically.But i don't want to store the file in database.I want to directly download it.Can any one help me.Thanks in advance
I solved the issue by installing "Document Management System" module and attaching the files to "ir.attachment" instead of storing them as a binary field.Now you can download the document from the attachments.
code :
filename="/home/cryosave_qrcodes/xyz.pdf"
files = open(filename,'rb').read().encode('base64')
ir_values={
'name':image_name,
'datas_fname': image_name,
'type':'binary',
'datas':files,
'create_uid':uid,
'partner_id':ids[0],
'res_model':'res.partner',
'res_id':ids[0],
}
self.pool.get('ir.attachment').create(cr,uid,ir_values,context=context)
Fetch what file you want
use read and write function in python.
import os
path = os.path.join(os.path.expanduser(),('~'), 'documents', 'python', 'file.txt')
fh = open(path,"w")
fh.write("Hello World")
fh.close()