digipodium/dputils

Could not Store info in Docx file

Closed this issue · 0 comments

i tested this code

import os
data = ""
folder = 'C:/windows/system32/'
files  = os.listdir(folder)
for item in files:
    fullpath = os.path.join(folder,item)
    if os.path.isfile(fullpath):
        sz = os.path.getsize(fullpath)
        out = f'{item.ljust(70)} | {sz/1024 :.1f} kb'
        data += out + '\n'

and then

from dputils import files
files.save_data('dlls.docx',data)

image