I hope you liked this Python automation example. Here are the links ⤵ 🌟 Source code: github.com/Sven-Bo/merge-txt-files-export-to-xlsm 🌟 Discord Server: pythonandvba.com/discord *Happy Coding!* 🚀
Hi Sven! Thank you once again for guiding us through the python automation ideas and your brilliant solutions! Me and my colleagues are grateful for your help with "merging multiply pdf''s by name" project . Thank you for your time and kindful assistance.😇
@@CodingIsFun Always thanks to you and the discord community. My summer holidays from work are over. When I get time again, I'll keep contributing. Thanks for the magnificent work teaching and in the production of digital content, because you are a source of inspiration for many young programmers ... well, and not so young 🤩
Very nice example! I have a small question, why do you define the current_dir like that? I am always using something like os.getcwd() but now I am not sure if this is more efficient or not. Would you know if there is any difference? Thanks in advance and congratz for your content!
Thank you! You can also use the os module. There is nothing wrong with that. However, some viewers might have set their current working directory to a different folder. In that case, the script will return an error. Hence, I am using the (slightly convoluted) inline if statement with pathlib.
Hi Sven, Thanks for the detailed coding explanation. It is very helpful. I also wnonder, if you change the file name from Student_number_Eng/Math to Student_Eng/Math_number, how would you change your code? Let say, the student number is from 001 to 100. I tried to use for loop, but it seems like python doesn't like it.
Thanks so much for watching the video and leaving a comment! Your request is definitely noted. However, I get a ton of requests for custom solutions and, as much as I'd love to help everyone out, I just don't have the time in my schedule to develop and test all of them. I hope you can understand. Happy Coding!
Greetings I have tons of files to process and I need to merge daily data files to monthly. Also, each file contains headings (55 lines) and the main body (343 lines). please assist. NB: the file extension is .trop
Thanks so much for watching the video and leaving a comment! Your request is definitely noted. However, I get a ton of requests for custom solutions and, as much as I'd love to help everyone out, I just don't have the time in my schedule to develop and test all of them. I hope you can understand. Happy Coding!
Hi, it is very helpful. I have an issue when I tried to do this. I got with xw.App(visible=False) as app: AttributeError: __enter__ . Do you know why it happens. Thank you.
Thanks for watching. Please use the latest version of xlwings. If that does not resolve the issue, please try another Python version. In the video I have used 3.8.5
f you are unable to do . open the terminal in the directory and run this command . "Get-ChildItem -Filter *.txt | Rename-Item -NewName { $_.Name -replace '\.txt$', '.csv' }" here i am converting txt files to csv files , replace on that you want to convert .
I hope you liked this Python automation example.
Here are the links ⤵
🌟 Source code: github.com/Sven-Bo/merge-txt-files-export-to-xlsm
🌟 Discord Server: pythonandvba.com/discord
*Happy Coding!* 🚀
Hi Sven! Thank you once again for guiding us through the python automation ideas and your brilliant solutions! Me and my colleagues are grateful for your help with "merging multiply pdf''s by name" project . Thank you for your time and kindful assistance.😇
Hi Anton. Thanks for watching the video and for your comment.
Happy to hear that you are satisfied with your pdf solution. Glad I could help! :)
Another practical cool tutorial from the legend. Thank you 😊
Happy to hear that you enjoyed this one too! Thanks for the comments and support, as always!
Extremely helpful, thank you!!
Glad it was helpful, Florian!
That was helpful, much appreciated!
Happy to hear that it was useful; thank you for taking the time to leave a comment and for watching the video!
How wonderful! Superb!
Thank you, Patricio! Also, many thanks for the outstanding contribution to our Discord channel! 👍
@@CodingIsFun Always thanks to you and the discord community. My summer holidays from work are over. When I get time again, I'll keep contributing. Thanks for the magnificent work teaching and in the production of digital content, because you are a source of inspiration for many young programmers ... well, and not so young 🤩
It is really helpful ! Thank you so much :)
An absolute pleasure, very happy to hear that you found it useful!
Very nice example! I have a small question, why do you define the current_dir like that? I am always using something like os.getcwd() but now I am not sure if this is more efficient or not. Would you know if there is any difference? Thanks in advance and congratz for your content!
Thank you!
You can also use the os module. There is nothing wrong with that.
However, some viewers might have set their current working directory to a different folder. In that case, the script will return an error. Hence, I am using the (slightly convoluted) inline if statement with pathlib.
very cool video as usual 👌
Thank you! Glad you liked this one too! :)
Hi Sven,
Thanks for the detailed coding explanation. It is very helpful.
I also wnonder, if you change the file name from Student_number_Eng/Math to Student_Eng/Math_number, how would you change your code? Let say, the student number is from 001 to 100. I tried to use for loop, but it seems like python doesn't like it.
Thanks so much for watching the video and leaving a comment! Your request is definitely noted. However, I get a ton of requests for custom solutions and, as much as I'd love to help everyone out, I just don't have the time in my schedule to develop and test all of them. I hope you can understand. Happy Coding!
When i'm defining current_dir i'm getting an error "cwd() takes 1 positional arguments bur 2 were given"
Thanks for watching. Please clone the GitHub repo and try again. Thanks!
Greetings
I have tons of files to process and I need to merge daily data files to monthly. Also, each file contains headings (55 lines) and the main body (343 lines).
please assist. NB: the file extension is .trop
Thanks so much for watching the video and leaving a comment! Your request is definitely noted. However, I get a ton of requests for custom solutions and, as much as I'd love to help everyone out, I just don't have the time in my schedule to develop and test all of them. I hope you can understand. Happy Coding!
Hi, it is very helpful. I have an issue when I tried to do this. I got with xw.App(visible=False) as app: AttributeError: __enter__ . Do you know why it happens. Thank you.
Thanks for watching. Please use the latest version of xlwings. If that does not resolve the issue, please try another Python version. In the video I have used 3.8.5
line 22, in
wb = app.books.open(excel_template). I got some error plz help ?
Thanks for watching, but with that bit of information ("I got some error"), I cannot help you. Sorry! 😅 Cheers, Sven ✌️
@@CodingIsFun thanx for you reply. error solved
@@RaviKumar-n8w1p what was the solution?
f you are unable to do . open the terminal in the directory and run this command .
"Get-ChildItem -Filter *.txt | Rename-Item -NewName { $_.Name -replace '\.txt$', '.csv' }"
here i am converting txt files to csv files , replace on that you want to convert .
Thanks for watching. I think the use case was slightly more complicated 😅, but thanks for the info! I appreciate it! 👍