How to measure the sizes of files inside an open .xlsx file - excel

Can anyone help with the following :
How to measure the sizes of the different files inside an .xlsx file while it is open for write in my excel?

As you already noted with your [zip] tag, .xlsx is actually a zip file. Therefore, even if the file is opened you still access it read-only and get the information you want.
I usually use the great Total Commander (the shareware is fully functional): navigate to the file and press Ctrl-Shift-ArrowUp and in the opposite window a new tab will open. In this tab, you can browse the .xlsx (or any other MS Office ZIP for that matter) as a normal folder, i.e. seeing it contents/file sizes/etc.

Related

Need to monitor user downloads folder for new .xlsx files, then open Excel, save the file, and close Excel

At work I use a tool that requires me to download a .xlsx file, open it, then save it to remove the workbook protection. I'd like to create a script that automatically opens and saves any .xlsx files that are saved in the downloads folder.
I'm assuming PowerShell is the right tool to use. I found this article that explains how to do something similar, but I need help with configuring the parameters.
https://social.technet.microsoft.com/Forums/scriptcenter/en-US/1faa97e0-2288-4bb2-b8ad-283df32779d4/can-i-open-an-excel-workbook-when-files-with-a-certain-extension-are-saved-in-a-specified-folder?forum=ITCG
What I need is for the script to monitor the $env:USERPROFILE\downloads folder for any .xlsx files. Then I need it to open that file in Excel (preferably in a minimized window), save it with the same filename, then close Excel.
You can use IO.FileSystemWatcher to monitor a directory. See Start-FileSystemWatcher for an example implementation in PowerShell.

Recover unsaved .csv file changes

Does anyone know a way to recover changes made in a .csv that were not saved when excel 2007 was closed.
At the moment, I don't see any way to solve this.
Check all the temporary files created recently. Especially alongside the file you opened. There are a few temp folders in the system that Excel may use. C:\Windows\temp is the main one, but it is usually under the Users folder in later versions of windows. Eg: C:\Users\YourUserName\Local Settings\Temp
If you find any files that look like Excel temps, take a copy and rename the extension and then try to open it.
(Your only real chance is if auto-save kicked in and saved a copy - to a temp file - when you still had your new changes in the document. Otherwise the changes are lost I'm afraid)
If option #1 doesn't resolve your problem in Excel, go to File->Options->Save. Hopefully your AutoRecover file location, under the third box, will be populated with an address.

Matlab: open files 'outside Matlab' by default

I'm looking for a way to have Excel files in my Matlab folder open 'outside Matlab' (i.e., by MS Excel in most cases) directly by double-clicking the file, rather than right-clicking and selecting 'Open Outside Matlab'.
The .xls files reader built in Matlab can be terribly slow for large files, and an unwanted double-click on a file can cost quite some time in which Matlab is unresponsive.
Thanks.
When you click something in the Current Folder tab, it's actually running the open command, which itself calls finfo to determine what it means by "open" for a given extension. You can see this by creating a breakpoint in open.m directly after the line [~, openAction] = finfo(fullpath); and double clicking - when it hits the breakpoint you'll see it returns openAction as uiimport.
In theory, you can create custom methods for extensions by creating on the path a function openabc where abc is the extension, which should be returned as the openAction.
However, if I look at my finfo.m it first searches for said functions and then regardless of whether or not it finds them if there is an inbuilt method it overwrites them with the standard behaviour. There's even a comment:
% this setup will not allow users to override the default EXTread behavior
If you are willing to muck about in the inbuilts, you may be able to do it like this (backup first! - this could affect other things). I did it temporarily by shadowing the existing finfo like this:
edit finfo.m (Now save a copy to the current folder)
Add these lines after the loop that defines the openAction (in my version, around line 85):
if any(strcmp(['.' ext], matlab.io.internal.xlsreadSupportedExtensions))
openAction = 'winopen';
end
From the folder containing your edited finfo.m, type which finfo -all. You should see two copies, the MATLAB one labelled as shadowed. Opening something from the current folder window should now open Excel externally.
I don't believe there's any straightforward way to do that. It's built in to MATLAB that Excel files will open in the import tool when you double click on them, and there's no way to change that.
You might be able to get around it by changing the file extension on your Excel files to something other than .xls or .xlsx. That would stop MATLAB from opening it in the import tool. Then in Windows, you could associate the new file extension with Excel.

Zip file with .csv extention lost somewhere in filesystem

The file is also locked with winzip and I cant remember the name or directory, I hid it in a very obscure directory. Could be in the windows system files could be in a program directory file. I did a search for all .CSV files I have 4-5K to go through. Any suggestions on how this could be done?
I was opening up files in batches by highlighting a bunch that pressing edit with notepad plus plus. Than going through each one. I know once the file is opened in notepad plus it will not show any words. It is pictures. I own an eCommerce site and I have my master copies that I bought $X,XXX and did not want to take any chances in them be found and resold by other people on my network. Any suggestions?
Opening any zip file in a hex editor suggests that every zip file starts with a data of PK. We can use it in our favour. :)
Download this software: EditPad Pro
What this software does is, it recurses through the whole filesystem starting from a specified base folder to search for any string residing in any of the child files, they maybe Text or Binary, it treats them the same, thus giving accurate results.
In our case, it's a regex: ^PK
When you'll execute this search, the software will return all the files that start with data PK, make sure you do a casesensitive search.

VBA - “Can't find Project or Library” for custom .xla files that are correctly located

We have a main .xls file that references several .xla files in the same folder. Most of the time, all the references open fine, but sometimes, seemingly at random, some users will starting getting Can't find Project or Library..
When looking at what is missing, it will be one of the .xla files; however, the path to the file it is looking for is exactly correct and the same files will work fine for others. We've found that if we rename the folder containing all the files, the problem generally goes away.
Due to users having shortcuts to the folder, we can't generally rename the folder though. The only way around it we have found is to create another .xls file that opens all the .xla files in the right order and then opens the main .xls file last. That works but it is confusing to users as to which version of the .xls file they should use.
Anyone have any ideas what causes Excel to think something is missing when it is exactly where the reference is pointing or how to fix it (other than renaming the folder)?
You will have to open the file before you can access the code in that.

Resources