get data from word table (1 Viewer)

zezo2021

Member
Local time
Today, 21:15
Joined
Mar 25, 2021
Messages
381
Hello friends

I need to get a word table to access tables

I can browse the open file dialog I need to import the data only from this file word

the problem I face when importing the file

Enter (Newline) between and above paragraph

the application converts it to a new row


my data is grouped based on citation no



the doc contains text above and below table


Thank you
 

Attachments

  • sample doc to access table.zip
    21.4 KB · Views: 369
Last edited:

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 14:15
Joined
Feb 28, 2001
Messages
26,999
You have asked this same question twice - once here and once in the Word section. Please avoid that as it leads to duplication of our effort, which we really do not like.

Check the Word topic to see my answer.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 15:15
Joined
May 21, 2018
Messages
8,463
I updated my example to Import from a word table or export to a word table. There is no error checking so you need to pick the correct word document for the "write to" or "import from." This successfully imports your Word table.
 

Attachments

  • ImportExportToWordTable.zip
    206 KB · Views: 414

jpl458

Active member
Local time
Today, 12:15
Joined
Mar 30, 2012
Messages
961
I updated my example to Import from a word table or export to a word table. There is no error checking so you need to pick the correct word document for the "write to" or "import from." This successfully imports your Word table.
Tried to open it but can't look inside the command buttons to see the code, and I can't get it to do anything, seems part of it is missing. Or, I don't understand it.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 15:15
Joined
May 21, 2018
Messages
8,463
Open up the
frmImportExportWordTable

Import
1. Open tblSample. Verify it is empty
2. Browse to the ReadFromTable.docx.
3. Select "Import from Word Table"
4. Refresh "tblSample". It would have populated from information in the Word table.

Export
1. Browse to Generic_template
2. Select Export to Word Table
3. The Data in "tblCosts" will export to the Word table.
 

jpl458

Active member
Local time
Today, 12:15
Joined
Mar 30, 2012
Messages
961
I updated my example to Import from a word table or export to a word table. There is no error checking so you need to pick the correct word document for the "write to" or "import from." This successfully imports your Word table.
That was fast. Thanks.
 

jpl458

Active member
Local time
Today, 12:15
Joined
Mar 30, 2012
Messages
961
Open up the
frmImportExportWordTable

Import
1. Open tblSample. Verify it is empty
2. Browse to the ReadFromTable.docx.
3. Select "Import from Word Table"
4. Refresh "tblSample". It would have populated from information in the Word table.

Export
1. Browse to Generic_template
2. Select Export to Word Table
3. The Data in "tblCosts" will export to the Word table.
That seems to fit the problem, will have to send seem time with it, because it ain't easy being green.
Really appreciate the detailed instructions.
Am I correct that you create the table in Word first then populate it?
Also what if the number off rows in the table changes each time I need it, do I need to set the table size i Wor to match the number of inbound rows, or can it grow or shrink

Thanks again
 
Last edited:

MajP

You've got your good things, and you've got mine.
Local time
Today, 15:15
Joined
May 21, 2018
Messages
8,463
That seems to fit the problem, will have to send seem time with it, because it ain't easy being green
All the pieces are in there so you would not have to write new code, but it is not trivial to understand. Using the code is pretty easy. That is why if you can post a sample query and a sample document I can give you a better demo. There a lots of different ways to do this.
 

jpl458

Active member
Local time
Today, 12:15
Joined
Mar 30, 2012
Messages
961
All the pieces are in there so you would not have to write new code, but it is not trivial to understand. Using the code is pretty easy. That is why if you can post a sample query and a sample document I can give you a better demo. There a lots of different ways to do this.
I will post it a bit later, life is getting in the way of software development at this moment.
 

Users who are viewing this thread

Top Bottom