MRAB writes:
> On 2019-06-26 22:14, Cecil Westerhof wrote:
>> MRAB writes:
>>
>>> Does Workbook support the 'with' statement?
>>>
>>> If it does, then that's the best way of doing it.
>>>
>>> (Untested)
>>>
>>> with Workbook() as wb_out:
>>> for filepath in filepathArr:
>>>
Cecil Westerhof wrote:
> I was asked to copy a certain line from about 300 Excel lines to a new
> Excel file. That is not something I would like to do by hand and I
> immediately thought: that should be possible with Python.
>
> And it is. I was surprised how fast I could write that with openpyx
On 2019-06-26 22:14, Cecil Westerhof wrote:
MRAB writes:
Does Workbook support the 'with' statement?
If it does, then that's the best way of doing it.
(Untested)
with Workbook() as wb_out:
for filepath in filepathArr:
current_row = []
with load_workbook(
MRAB writes:
> Does Workbook support the 'with' statement?
>
> If it does, then that's the best way of doing it.
>
> (Untested)
>
> with Workbook() as wb_out:
> for filepath in filepathArr:
> current_row = []
>
> with load_workbook(filepath) as wb_in:
>
On 2019-06-26 13:15, Cecil Westerhof wrote:
Cecil Westerhof writes:
I was asked to copy a certain line from about 300 Excel lines to a new
Excel file. That is not something I would like to do by hand and I
immediately thought: that should be possible with Python.
And it is. I was surprised ho
Cecil Westerhof writes:
> Is it necessary to close the workbooks to circumvent a resource
> leak?
Still like to know. When not necessary it is better not to cloes them
I think.
> Is it a problem when a workbook is closed two times? If so I need to
> make sure that this is not possible.
That i
Cecil Westerhof writes:
> I was asked to copy a certain line from about 300 Excel lines to a new
> Excel file. That is not something I would like to do by hand and I
> immediately thought: that should be possible with Python.
>
> And it is. I was surprised how fast I could write that with openpyx
I was asked to copy a certain line from about 300 Excel lines to a new
Excel file. That is not something I would like to do by hand and I
immediately thought: that should be possible with Python.
And it is. I was surprised how fast I could write that with openpyxl.
My first try was not very neat,