Re: Write tables from Word (.docx) to Excel (.xlsx) using xlsxwriter

2020-05-28 Thread BBT
On Thursday, 28 May 2020 03:07:48 UTC+8, Peter Otten wrote: > BBT wrote: > > > I tried your code by replacing the Document portion: > > > But I received an error: > > TypeError: __init__() takes 1 positional argument but 2 were given > > We seem to have different ideas of what replacing means.

Re: Write tables from Word (.docx) to Excel (.xlsx) using xlsxwriter

2020-05-27 Thread Peter Otten
BBT wrote: > I tried your code by replacing the Document portion: > But I received an error: > TypeError: __init__() takes 1 positional argument but 2 were given We seem to have different ideas of what replacing means. Here is the suggested script spelt out: import xlsxwriter from docx.api i

Re: Write tables from Word (.docx) to Excel (.xlsx) using xlsxwriter

2020-05-27 Thread BBT
On Thursday, 28 May 2020 02:40:49 UTC+8, Peter Otten wrote: > BBT wrote: > > > On Thursday, 28 May 2020 01:36:26 UTC+8, Peter Otten wrote: > >> BBT wrote: > >> > >> > I am trying to parse a word (.docx) for tables, then copy these tables > >> > over to excel using xlsxwriter. This is my code: >

Re: Write tables from Word (.docx) to Excel (.xlsx) using xlsxwriter

2020-05-27 Thread BBT
On Thursday, 28 May 2020 02:40:49 UTC+8, Peter Otten wrote: > BBT wrote: > > > On Thursday, 28 May 2020 01:36:26 UTC+8, Peter Otten wrote: > >> BBT wrote: > >> > >> > I am trying to parse a word (.docx) for tables, then copy these tables > >> > over to excel using xlsxwriter. This is my code: >

Re: Write tables from Word (.docx) to Excel (.xlsx) using xlsxwriter

2020-05-27 Thread Peter Otten
BBT wrote: > On Thursday, 28 May 2020 01:36:26 UTC+8, Peter Otten wrote: >> BBT wrote: >> >> > I am trying to parse a word (.docx) for tables, then copy these tables >> > over to excel using xlsxwriter. This is my code: >> > >> > from docx.api import Document >> > import xlsxwriter >> > >> >

Re: Write tables from Word (.docx) to Excel (.xlsx) using xlsxwriter

2020-05-27 Thread BBT
On Thursday, 28 May 2020 01:36:26 UTC+8, Peter Otten wrote: > BBT wrote: > > > I am trying to parse a word (.docx) for tables, then copy these tables > > over to excel using xlsxwriter. This is my code: > > > > from docx.api import Document > > import xlsxwriter > > > > document = Document('/U

Re: Write tables from Word (.docx) to Excel (.xlsx) using xlsxwriter

2020-05-27 Thread Peter Otten
BBT wrote: > I am trying to parse a word (.docx) for tables, then copy these tables > over to excel using xlsxwriter. This is my code: > > from docx.api import Document > import xlsxwriter > > document = Document('/Users/xxx/Documents/xxx/Clauses Sample - Copy v1 - > for merge.docx') tables = d

Write tables from Word (.docx) to Excel (.xlsx) using xlsxwriter

2020-05-27 Thread BBT
I am trying to parse a word (.docx) for tables, then copy these tables over to excel using xlsxwriter. This is my code: from docx.api import Document import xlsxwriter document = Document('/Users/xxx/Documents/xxx/Clauses Sample - Copy v1 - for merge.docx') tables = document.tables wb = xlsx