A little help in programming docx to Excel

In summary: It seems that it does what you want if(!) the form is filled locally. (You could call the macro they give at the moment they save although this might lead to double records)Yes, definitely possible! you would have to write Subs or Functions to look up Word files in a specific directory then process each of them to get the output data.
  • #1
jmex
59
3
Hello all,

i don't have much knowledge about programming so i googled about fetching datas from docx to excel and it showed can be done by VB. I see under developer tab in excel and opened Macros where i can write programmes.
Now i have many docx files in my folder and daily it is increased by one or two. I want my excel to fetch data from it automatically. Is it possible? If yes then how can i do it?
In the document i have names and numbers written. How can i do it? If not excel then access file is also good.
Kindly help.

Thanks,
 
Technology news on Phys.org
  • #2
What format do the names and numbers have?
Are they tab separated, space separated, ...?

Another practical question, does this continue indefinitely? Because depending on the amount of names those files will become HUGE depending on the amount of records in each file and whether or not you delete them once your script runs. (caution is warranted because it could break when the format of the data changes resulting in a loss of data)
Depending on the number of records it would be good to look at other ways to store them than an excel file (e.g. a database).
 
  • #3
thank you so much for your reply,
I have a word that has only text box i believe in which i have to fill up data. Below is the screen shot
i don't know but i can't edit or click on any other written data except write inside box.
upload_2016-9-23_10-12-21.png

I can't do anything else except writing inside the box and i only want to fetch the written data. So is it possible?

Thanks,
 

Attachments

  • upload_2016-9-23_10-12-10.png
    upload_2016-9-23_10-12-10.png
    1.7 KB · Views: 452
  • #4
Do you think this is what you want to do? http://www.techrepublic.com/blog/10...ransferring-word-form-data-to-an-excel-sheet/

It seems that it does what you want if(!) the form is filled locally. (You could call the macro they give at the moment they save although this might lead to double records)

In case you receive these forms daily I'll have to check out some more stuff.
A good idea could be to convert the forms to textfiles in a certain format (CSV, tab separated, ...) but I'm not immediately certain how this is done quickest/best.
 
  • Like
Likes Pepper Mint
  • #5
Thank you for replying. I have read the process but the problem is i have to open every document and program it. Instead is it possible to program a single excel file so that it can fetch all the data from documents available in the folder?
 
  • #6
jmex said:
Thank you for replying. I have read the process but the problem is i have to open every document and program it. Instead is it possible to program a single excel file so that it can fetch all the data from documents available in the folder?
Yes, definitely possible! you would have to write Subs or Functions to look up Word files in a specific directory then process each of them to get the output data.

For example, searching C drive for Word document files.
Code:
Dim ofs As Office.FileSearch
Dim i As Integer
Set ofs = Application.FileSearch

With ofs
    .NewSearch
    .FileType = msoFileTypeAllFiles
    .Filename = "*.doc"
    .LookIn = "C:\"
    .SearchSubFolders = True
    .Execute
End With
 
  • Like
Likes jmex
  • #7
Thank you Pepper Mint. can you help me to fetch the datas written inside all the documents? I don't know much about programming.
 

FAQ: A little help in programming docx to Excel

How can I convert a docx file to an Excel spreadsheet?

There are several methods for converting a docx file to an Excel spreadsheet, but one of the easiest is to use a programming language such as Python. You can write a script that opens the docx file, extracts the data, and then saves it as an Excel file. Alternatively, you can use a conversion tool or online converter.

Is there a way to automate the process of converting multiple docx files to Excel?

Yes, you can use a programming language like Python to create a script that loops through a folder of docx files and converts each one to an Excel spreadsheet. This way, you can save time and effort by automating the process.

Can I customize the output of the conversion from docx to Excel?

Yes, if you are using a programming language to convert the files, you can customize the output by specifying which data to extract and how to format it in the Excel spreadsheet. This allows you to tailor the output to your specific needs.

Is there a way to preserve formatting when converting from docx to Excel?

Yes, you can use a conversion tool or a programming language to preserve formatting when converting from docx to Excel. These tools typically have options to retain the original formatting of the document or allow you to specify how you want the data to be formatted in the Excel file.

Can I convert a docx file to Excel without using a programming language?

Yes, there are online converters and software programs that allow you to convert a docx file to an Excel spreadsheet without using a programming language. However, these tools may have limitations in terms of customization and may not be suitable for bulk conversions.

Similar threads

Replies
16
Views
2K
Replies
1
Views
1K
Replies
14
Views
1K
Replies
1
Views
931
Replies
9
Views
1K
Replies
6
Views
884
Replies
4
Views
3K
Back
Top