CONFIDENTIALITE : Ce message et les éventuelles pièces attachées sont confidentiels. Si vous n'êtes pas dans la liste des destinataires, veuillez informer l'expéditeur immédiatement et ne pas divulguer le contenu à une tierce personne, ne pas l'utiliser pour quelque raison que ce soit, ne pas stocker ou copier l'information qu'il contient sur un quelconque support. Tous droits réservés.
CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium. All rights reserved.
> So it seems that openpyxl is not reducing my memory risk; too bad
> because I
> was also interested in decreasing Excel file size (for later transfers
> across the net) and in some abilities that are not in xlwt...
You can't really make the file any smaller but as long as you're only
writing files you might want to look at xlsxwriter which is fast and
memory efficient.
Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
# ------------------------------------
def wsWriteMerge(leWS, iStartRow0, iEndRow0, iStartCol0, iEndCol0, laValeur, leStyle):
"Replace xlwt ws.write_merge using openpyxl syntax"
leWS.merge_cells(start_row=iStartRow0+1, end_row=iEndRow0+1, start_column=iStartCol0+1, end_column=iEndCol0+1)
leWS.cell(row=iStartRow0+1, column=iStartCol0+1).value = laValeur
for ii in range(iStartRow0+1, iEndRow0+1+1):
for jj in range(iStartCol0+1, iEndCol0+1+1):
leWS.cell(row=ii, column=jj).style = leStyle
# ------------------------------------
Am .03.2015, 17:45 Uhr, schrieb <jean-jacques.benedetti@nextis-consulting.com>:
I have a tree data structure containing values and styles; currently I
write leaves column W, then branches columns U and V, then trunk columns A
to S.
To use write-only mode you'll have to flatten the tree so that you can pass rows to be serialised. I suspect that using a temporary sqlite database might be the best way to do this to keep memory use down. Or maybe Pandas?
Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
) seems a bit overkill to me; I don't want to get to such sophistication if I can avoid...Jean-Jacques Benedetti | ||
18 rue de Mogador 75009 Paris FRANCE | ||
Am .03.2015, 20:18 Uhr, schrieb Jean-Jacques Benedetti
--
You received this message because you are subscribed to a topic in the Google Groups "openpyxl-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpyxl-users/ksN63fhrjWc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpyxl-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jean-Jacques Benedetti | ||
18 rue de Mogador 75009 Paris FRANCE | ||