| Windows 7: Batch processing (xlsx to xlsb) in Excel 2010 |
13 Apr 2012
|
#11 | | |
Sorry. Quote: My folder topology looks like this:
main folder -> containing 44 folders -> each of them containing 1-3 specific folders -> where each of those specific folders contain 1 specific folder -> which contains the xlsx-files (about 10-30 files) which need to be converted into xlsb-files. So the 44 subfolders contain around 1800 xlsx files?
Is the "1 specific folder" in the subfolder named the same?
Is that 10-30 files in each "1 specific folder" or all up?
Do the files that need converting have anything in common. eg tag, dates?
Can you do a search in Explorer and return those specfic files or sort returned files so there grouped? | My System Specs |
| System Manufacturer/Model Number Self built OS Windows 7 Ultimate x64 CPU Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC) Motherboard Asus P5Q-E Memory Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4) Graphics Card Palit GeForce GTS 250 (1024MB) Sound Card On Board (ADI AD2000B 8ch HD) Monitor(s) Displays Samsung 32in LCD TV Screen Resolution 1360x768 Keyboard Logitech MX5000 Laser (Combo) Mouse Logitech MX5000 Laser (Combo) PSU 550W Antec Neo HE 550 Case Antec P180 Cooling Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans Hard Drives 2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures) Internet Speed ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up) Other Info Gigabyte GN-WP01GS 54g Wireless Lan Card |
13 Apr 2012
|
#12 | | |
Yes, the "1 specific folder" you bolded is named exactly the same.
And yes, this "1 specific folder" contains 10-30 files.
Well, the files have something in common, but there are files named the same in other folders, which I don't want to be converted.
So no, I can't (at least I can't think of a way how I could) search for the specific files only. | My System Specs | | OS Windows 7 Ultimate x64 |
13 Apr 2012
|
#13 | | |
If there's only 10-30 files in one folder that need converting it wil probably be easier just to copy the paths one by one.
Otherwise does the "1 specific folder" named exactly the same exist in multiple subfolders and contain only the files to be converted?
Draw me a better picture, eg.
Main Folder
-Sub1
---FolderW
-----Files (don't convert)
---FolderX
-----Files (don't convert)
---Specific Folder
-----Files (All Convert)
-Sub2
---FolderY
-----Files (don't convert)
---FolderZ
-----Files (don't convert)
---Specific Folder
-----Files (Some Convert) | My System Specs | | System Manufacturer/Model Number Self built OS Windows 7 Ultimate x64 CPU Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC) Motherboard Asus P5Q-E Memory Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4) Graphics Card Palit GeForce GTS 250 (1024MB) Sound Card On Board (ADI AD2000B 8ch HD) Monitor(s) Displays Samsung 32in LCD TV Screen Resolution 1360x768 Keyboard Logitech MX5000 Laser (Combo) Mouse Logitech MX5000 Laser (Combo) PSU 550W Antec Neo HE 550 Case Antec P180 Cooling Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans Hard Drives 2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures) Internet Speed ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up) Other Info Gigabyte GN-WP01GS 54g Wireless Lan Card |
13 Apr 2012
|
#14 | | |
I don't think so. Like I said, altogether there are like 1800 xlsx files. The "1 specific folder" contains 10-30 files. So I have about 90 of those "1 specific folders". Therefore copying the paths one-by-one is too time consuming.
Yes Exactly. The "1 specific folder" has the same name in every of the subfolders. This "1 specific folder" contains only files which need to be converted (10-30 files).
So if it's possible to search for all of the folders named like the "1 specific folder" and to convert all the xlsx files it has in it, that should do the trick. *edit*
just saw your edit after posting. I'm going to prepare a better picture for you. just one sec... | My System Specs | | OS Windows 7 Ultimate x64 |
13 Apr 2012
|
#15 | | |
First try this, Code: For /r "C:\Main Folder" %i in ("Specific Folder\*.xlsx") do echo %i >> FilePaths.txt | My System Specs | | System Manufacturer/Model Number Self built OS Windows 7 Ultimate x64 CPU Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC) Motherboard Asus P5Q-E Memory Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4) Graphics Card Palit GeForce GTS 250 (1024MB) Sound Card On Board (ADI AD2000B 8ch HD) Monitor(s) Displays Samsung 32in LCD TV Screen Resolution 1360x768 Keyboard Logitech MX5000 Laser (Combo) Mouse Logitech MX5000 Laser (Combo) PSU 550W Antec Neo HE 550 Case Antec P180 Cooling Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans Hard Drives 2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures) Internet Speed ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up) Other Info Gigabyte GN-WP01GS 54g Wireless Lan Card |
13 Apr 2012
|
#16 | | |
^works, BUT returns the path of each xlsx file. What I need for the macro strollin posted, is the path of the "specific folders" only. | My System Specs | | OS Windows 7 Ultimate x64 |
13 Apr 2012
|
#17 | | |
My mistake again.
Just open the main folder in Explorer and search for "Specific Folder".
Select all folders, hold shift and right click.
Click Copy as Path
Paste into notepad
Edit > Replace
Find: "
Leave Replace blank and Replace all
Edit > Replace
Find: Specific Folder
Replace: Specific Folder\
Replace all
I tested the macro and it won't work if the path contains the quotes. Edit: Just paste straight into Excel and do the second Replace | My System Specs | | System Manufacturer/Model Number Self built OS Windows 7 Ultimate x64 CPU Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC) Motherboard Asus P5Q-E Memory Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4) Graphics Card Palit GeForce GTS 250 (1024MB) Sound Card On Board (ADI AD2000B 8ch HD) Monitor(s) Displays Samsung 32in LCD TV Screen Resolution 1360x768 Keyboard Logitech MX5000 Laser (Combo) Mouse Logitech MX5000 Laser (Combo) PSU 550W Antec Neo HE 550 Case Antec P180 Cooling Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans Hard Drives 2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures) Internet Speed ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up) Other Info Gigabyte GN-WP01GS 54g Wireless Lan Card |
13 Apr 2012
|
#18 | | |
ah right, I could have thought of that myself. :\
Thanks a lot!
Rep added to both of you, Duzzy and strollin!
(I'll run the macro while I'm away, I'll report back if everything went fine) | My System Specs | | OS Windows 7 Ultimate x64 |
13 Apr 2012
|
#19 | | Win 7 Ultimate (64-bit), Win 7 Pro (32-bit) N. Calif |
I don't think anyone can provide you with a 1-click solution, whatever method you use will require you to put in some manual effort. | My System Specs | | System Manufacturer/Model Number Home Built, Dell Inspiron 1520 Laptop OS Win 7 Ultimate (64-bit), Win 7 Pro (32-bit) CPU 3.4Ghz 3770K i7, 2.4Ghz Core 2 Duo Motherboard Gigabyte Z77X-UD3H, Dell Memory 8G, 3G Graphics Card ATI Radeon HD 5770, Mobile Intel 965 Sound Card High Definition Audio (Built-in to mobo) Monitor(s) Displays Dell 2409W 24" Screen Resolution 1920x1080 Keyboard IBM Model M - used continuously since 1986 Mouse Microsoft PSU Antec Case Antec 100 Cooling CM 212+ Hard Drives 128G SSD OS; 1.5T & 2T Data on Desktop, 320G for laptop Internet Speed 1.5M down 1.2M up :-( Other Info Also have an Acer Aspire netbook, a home-built AMD Dual core (Minecraft server) and home-built Pent 4 all running Win 7. Also have various machines running XP, Win Server 2K, Win Server 2003, Linux and DOS. I think I have a problem... |
13 Apr 2012
|
#20 | | Win 7 Ultimate (64-bit), Win 7 Pro (32-bit) N. Calif |

Quote: Originally Posted by Duzzy My mistake again.
Just open the main folder in Explorer and search for "Specific Folder".
Select all folders, hold shift and right click.
Click Copy as Path
Paste into notepad
Edit > Replace
Find: "
Leave Replace blank and Replace all
Edit > Replace
Find: Specific Folder
Replace: Specific Folder\
Replace all
I tested the macro and it won't work if the path contains the quotes. Edit: Just paste straight into Excel and do the second Replace The macro could be modified to add the backslash which would eliminate the need for the second Replace. Replace this line: Code: strPath = ThisWorkbook.Worksheets(1).Cells(i, 1).Value with this: Code: strPath = ThisWorkbook.Worksheets(1).Cells(i, 1).Value & "\" Either way, all the paths in the list need to be consistent. | My System Specs | | System Manufacturer/Model Number Home Built, Dell Inspiron 1520 Laptop OS Win 7 Ultimate (64-bit), Win 7 Pro (32-bit) CPU 3.4Ghz 3770K i7, 2.4Ghz Core 2 Duo Motherboard Gigabyte Z77X-UD3H, Dell Memory 8G, 3G Graphics Card ATI Radeon HD 5770, Mobile Intel 965 Sound Card High Definition Audio (Built-in to mobo) Monitor(s) Displays Dell 2409W 24" Screen Resolution 1920x1080 Keyboard IBM Model M - used continuously since 1986 Mouse Microsoft PSU Antec Case Antec 100 Cooling CM 212+ Hard Drives 128G SSD OS; 1.5T & 2T Data on Desktop, 320G for laptop Internet Speed 1.5M down 1.2M up :-( Other Info Also have an Acer Aspire netbook, a home-built AMD Dual core (Minecraft server) and home-built Pent 4 all running Win 7. Also have various machines running XP, Win Server 2K, Win Server 2003, Linux and DOS. I think I have a problem... Batch processing (xlsx to xlsb) in Excel 2010 problems? All times are GMT -5. The time now is 05:00 AM. | |