Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
se2
Helper II
Helper II

Power BI , Word Files, and File Names

Can Power Bi do the following?

I have a large number of word documents (I also have them as Excel files but the formatting is better in Word).  The documents are named 1 misc.doc, 2 misc.doc ......     Each document has a title, in bold, at the very top of the document.  But most documents have some misc. text, in one or two rows before the title, a few words such as "Print" or "Tools".  I would like to remove these words, most importantly I would like to grab that title, in bold.   For simplicity, let's call the new title:  xTitle. Then rename or make a new file called 1 xTitle.doc  (or similar in excel).  The files do not have the same number of columns and a variety of different tables, etc.  Their only commonality is the bold title at the start of the document.

Thank you?

Steve

5 REPLIES 5
amitchandak
Super User
Super User

@se2 , Not very clear. But I doubt you can do that.

In case you need some data, there is workaround suggested in this ticket refer : https://community.powerbi.com/t5/Desktop/Extract-tables-from-word-document/td-p/100632

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you.  Would it be possible if my file were excel files or html files.  To clarify:

1. I have two folders, one with excel files, one with html files.

2. The files are uneven. While they have columns, they have different numbers of them, so these are not excel files that can be "merged."

3. The files are named in a way that does not show their content.  This is the problem: 1 misc.xlsx ...

4. Sometimes the 1st or 2nd rows contain a word or two that is irrelevant.

5. By the 3rd row, there is a heading in bold.  I would like to be able to grab this and rename the file with that heading.  So 1 misc.xlsx becomes 1 MyHeading.xlsx

6. Is is possible to write use dax or M to spool through the files and do the renaming or copying to new files with informative names?

Steve

 

Greg_Deckler
Community Champion
Community Champion

@se2 While it *might* be possible, that is NOT a good use of Power Query, you should be doing that in a scripting language of some sort. I mean, if you were to do it, you would probably need R or Python steps I think. I'm really overall against this approach, I just think you need a better/different tool for this.

 

@ImkeF @edhans do you agree? This leads down a rabbit hole of sadness and despair, right?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Just wanted to make sure I'm not wasting my time. In fact, I have the above finally done using FoxPro which can do a lot of what Python and are due. I have another question. I have six Excel spreadsheets, each one has a budget for one year, here one,… Through year six. Each one uses the same categories that is personnel, fringe, etc. Of course, because costs increase year by year, the costs in the year one budget are a little less than the costs in year two, etc. I would like to bring these budgets together into one budget sheet. In the left column, there would still be the same categories: personnel, fringe, etc. however, in column two, the header would be your one, in column three, it would be year to, etc. and I would be able to see the budget for the six years on one spreadsheet. Is there a way to accomplish this with power VI, or do I still need to go back to our Python or whatever? Thanks so much Steve

Sorry, with voice dictation, I misspelled year one, year two, year three, year four, your five, year six, so the resulting matrix will have, in column one, personnel, fringe, travel, etc.,

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors