Program that counts certain words in a text?
I would like to find or write a program that searches for specific words in a text and inserts them into an Excel spreadsheet.
Can you help me with this?
I would like to find or write a program that searches for specific words in a text and inserts them into an Excel spreadsheet.
Can you help me with this?
Not ones like flight attendant or pilot, where traveling is the job. Rather, those where you have to do "work travel," for example—I hope you understand what I mean. So, where you travel for work purposes. Are there any like that? Probably more in the IT sector, right?
Hello everyone, I want to create an image with AI. Once it's created, I want to be able to reference the image and change individual parts. Example: I have taken a picture with people and I would like to be able to write "Make the left-hand person's hair longer and black and change nothing else."…
I've been in a wheelchair since birth and have a chip card that allows me to use disabled toilets. Is it difficult to copy a card like this so that I have a second one for my car if I forget it?
Good morning I've been thinking about studying computer science for a long time, and I'm currently learning the basics of Python in a student club at university. Because there's a math club at our school next semester so we can do even more math, I'm wondering whether it makes sense to sign up for it….
I would like to learn cyber security and wanted to ask what prior knowledge is needed to learn it and which programming language is intended for it?
Finding and counting given words in a text/text file is quite banal for Powershell.
Test.txt
demo.ps1
Directly creating an Excel worksheet might be a pain in the ass, and not just in Powershell. https://maliyaablog.wordpress.com/2017/10/02/how-to-createwrite-and-save-excel-using-powershell/
The easiest way is probably to export as a CSV file.
Importing a CSV file into Excel is cheap compared to the effort required to create it directly: https://www.pc-magazin.de/ratgeber/excel-csv-dateien-importieren-microsoft-office-3202344.html
This would look like this (I have combined the above functional script part into a short script and simply replaced Format-Table with the Export-CSV cmtlet)
demo.ps1
Simply import the word count.csv file into Excel…
There are certainly some off-the-shelf programs that offer similar functionality. However, for me, such a thing is irrelevant. Writing such a Powershell script is faster than searching for any programs.
Note on the RegEx for the search term(s)
$SuchPattern resolved:
Thank you, that was very helpful. I still have one question. How can I insert the number into, say, A1, A2, and A3 in an existing Excel file?
Hey I have a Win 11 now could it be that it doesn't work anymore
The onboard Powershell is the same (5.1.0) as under Win 10. That can't be the problem.
Doesn't work anymore is a pretty vague error description.
On the PowerShell side, nothing seems to have changed, apart from the fact that the security policies regarding script execution have been tightened (occasionally prompted to change the execution policies). However, this affects Windows 10 & 11.
However, this has no functional impact.
Regarding changes made when importing the CSV into Excel, I can't comment. Excel isn't my thing.
Finding it will be difficult, I think… But writing… There is official documentation for it in various programming languages
Notepad++ can count in the search function.
Do you mean in Excel with VBA?
Perhaps a formula would also be conceivable
https://www.computerbild.de/artikel/cb-Tipps-Software-Excel-Werte-zaehlen-31569615.html