Is it possible to unzip a .xlsm file without corrupting it?

Hello.
I have had some success at actioning the following sequence of steps over a .xlsx file:
1) Rename it to .zip.
2) Unzip it.
3) Make changes across the unzipped XML files with a search and replace tool.
4) Rezip it.
5) Rename it back to .xlsx.
6) Open it up in Excel, without loss of integrity (and with the replacements from the search and replace tool intact).
Does anyone know if this is possible with a .xlsm file? If I eliminate step 3) (i.e., in order to round-trip without making any edits, just to prove that round-tripping works), Excel tells me that the file has been corrupted when I try to open it up.
While on the subject, does anyone know of a tool or method of automating the above 6 steps, so that I can action it over all my Excel files?
Many thanks.
Keith

The .xlsx and .xlsm files behave the same in this respect. 
I suspect you had an error in your process.  In particular, make sure that no new files were created while making changes and that the changes were made properly.
You can use many zip/unzip tools, including Java's jar tool (cross platform, client or server).
Example:
Start with a spreadsheet such as updateTest.xlsm.
Create a subdirectory such as updateTest and cd to that.
Run
  $ jar xvf ../updateTest.xlsm
Then run
  $ jar cvfM ../updateTest01.xlsm *
The above example leaves all the xml files in the subdirectory and the resulting updateTest01.xlsm opens in Excel without warnings.
Note: the “M” option for jar is essential to avoid adding a manifest. 
The “v” option is optional.
It is possible to modify the xml files between the above two steps, but again, make sure there are no new files and make changes properly. 
The file [Content_Types].xml tracks the expected files, so these and only these should be present.
For changing the content, here is an excellent article: Editing Data in an Excel 2007 Open XML File with VBA (http://msdn.microsoft.com/en-us/library/dd819387(v=office.12).aspx)
In summary, you can edit numbers in your xl/worksheets/sheetX.xml files, but strings are centralized in xl/sharedStrings.xml. 
Cells with strings include an index into the sharedString.xml table. 
Note that there is a bug in the above article: any new strings must be added to the end or else they will throw off the indexing for other references.
As a hack, you can include dummy strings in your spreadsheet and then update sharedStrings.xml.
Note that with the java.util.zip package, you can create the files and zip files programmatically. 
This could be better for large numbers of updates.  See
http://java.sun.com/developer/technicalArticles/Programming/compression/.
 Other tools and approaches can be used as well.

Similar Messages

  • Is it possible to create a control file without the datafiles

    Hi All,
    Is it possible to create a control file without the datafiles?
    on any OS or DB version
    regards,
    sachin

    if I understand properly:
    - you have a script to recreate the controlfile
    - you have all of your database files backed up except your controlfiles
    This should work as this is how we sometimes refresh dev databases:
    1) restore the copies of the database files
    2) recreate the controlfile
    3) recover the database files to the desired point in time (if hot backup or archivelogs are available, otherwise, it would be as of the time of the backup)
    4) add temp files to temporary tablespace(s)
    The simpler solution would be to backup your controlfile at the same time as your datafiles (RMAN or o/s copy).
    I hope I understood your question properly.

  • Is it possible to download a zipped file without unzipping it?

    I need to download zipped Joomla extensions from the Joomla website and then upload them to my LINUX website, via my Macintosh. The problem is that my Macintosh unzips the files. I then have to compress the files again before I upload them. This usually works without a problem but it'd be safer to download the file without unzipping them. Is there a way to do this? I can't find any Preference for zipping or compressing, or any documentation about controlling compression in Mac Help.

    try Safari > preferences > general. untick +open "safe" files+ ...
    ( *click on image to enlarge* )
    JGG

  • Is it possible to remove iOS install files without upgrading?

    I have a 5th gen iPod Touch.
    I'm not upgrading to iOS 7. The iPod downloaded the install file and tells me it's ready to be installed, the file seems to occupy about 1Gb on th iPod, I would like to remove it to free that space.
    Maybe i will download it again or upgrade via iTunes in the future.
    Can I remove the file from the iPod?

    I have not seen a way.posteed here. You can try Googling.

  • Disk utility can't repair this disk.... Is it still possible to back up my files?

    I was just on Word earlier and the mac crashed, I restarted it and it wouldn't load past the grey screen. I then used my install disc to go into disk utility, where it tried to verify and repair my Macintosh HD but failed to do both. I don't know what's cause this but more importantly I need to know where it's still possible to back up my files without having to purchase Disk Warrior. If I was to take it to the Apple store, what would they suggest?
    I don't know what my operating system is, I recently did a system update last week I believe if that means anything?
    Thanks for your time
    Luke

    Okay thanks Thomas Reed, it's a shame this has happened. It was so sudden...one minute I'm typing on word, the next minute it's broke beyond repair?
    It's peculiar how it says Disk Ultility can't repair the drive but to try and back up your files...when it's actually impossible to do so without any software. I'm assuming things like creating a new image etc. won't help at all.
    I'm hoping the Apple Store people will be able to help me out, I've heard DiskWarrior is good so I may check that out.

  • Import m4a file without metadata

    Using latest itunes 11.0.1.
    While it is possible to import a wav file without metadata it seems not to be impossible to import a m4a file without metadata.
    The wav file will be stored under "unknown .." folders and displayed in the itunes windows. Now metadata can be added
    via itunes "information".
    Does anyone know how to achieve the same with m4a files?

    there's no exclude data in 9i you have to use normal export/import with option called row=N like the above post said .
    if you need more help about export/import use
    exp -help
    imp -help

  • Loading jar files without extracting

    Is it possible to load a jar file without extracting it? If so, how?
    I've loaded the JCE and the class that I'm using references another jar file, which also comes with the JCE. I've loaded that other jar as well, but it's failing. It appears to be looking for the jar by it's name (US_export_policy.jar). I'm not sure how to get Oracle's JVM to see the other jar.
    Thanks,
    Kevin Ash
    [email protected]

    On 10/28/10 11:13 PM, Tilak wrote:
    > I use JDT API org.eclipse.jdt.internal.core.util.ClassFileReader to
    > identify annotated POJOs, which doesn't provide functionality to
    > identify a POJO as annotated if it's parent (interface) is already
    > annotated.
    If you're directly reading class files, you may have to navigate the
    class hierarchy yourself, e.g., recursively find and open the parent
    types to search for annotations.
    If the annotation type you're looking for has
    @Retention(RetentionType.RUNTIME) or @Retention(RetentionType.CLASS),
    and if it has @Inherited, then the APT annotation processing API will
    report a class as showing the annotation, if one of its superclasses is
    annotated. Roughly the same is true of reading the class reflectively.
    However, that does not apply to interfaces, only to superclasses. You
    can read about that in the JDK docs [1].
    I guess what I'm saying is that by the terms of Java, a POJO _is not_
    annotated just because it implements an interface that happens to be
    annotated. Therefore there is no direct way to ask a representation of
    a class whether it is annotated in this way - rather, you have to walk
    the supertype hierarchy and ask the individual interfaces whether they
    have the annotation.
    [1]
    http://download.oracle.com/javase/1.5.0/docs/api/index.html? java/lang/annotation/Retention.html

  • Can I export Adobe Proto files without Creative Cloud?

    I would like to buy the app, but i'm reading a lot about exporting to Creative Cloud, but I don't have Creative Cloud.
    Is it possible to export Adobe Proto files without Creative Cloud?

    As of now, the only way to transfer or share Proto files from the app is via the Creative Cloud website.

  • How to get the update file without using Nokia Sof...

    The network connection is unreliable and downloading the firmware update using PC Suite for my Nokia E90 proves difficult. Does anyone know how I can get the firmware version 300.34.84?
    The trouble is Nokia's Software Updater does not accommodate any slight interruption to the connection during the update process. I will update this discussion with what version of PC Suite I have once I get that info.
    Any help is kindly appreciated

    In fact, it is not Possible to get the update file without using Nokia Software Updater or you should search the net to find the update files in another place and even you get them, you can not use them with NSU.
    You can Update your Device with:
    1 - NSU (Nokia Software Update)
    2 - FOTA (Firmware Over The Air) for FP2 devices ONLY.
    3 - Nokia Care Center
    there is not other way to upgrade.
    Hope useful for u.
    regards
    Nokia N79 4GB
    SW Version: 32.001 RM-348 MEA

  • 'Edit in Place' for XLSM-files (Excel Macro-Enabled)

    Hi,
    is it possible to activate 'Edit in Place' for xlsm-files (Excel Macro-Enabled Workbook file)?
    For xls(x)-files there is the link 'Edit This File', but not for files of type 'xlsm' allthough they could be dealt the same way with Excel.
    I know I can edit this files using the 'Add-in for MS Office' and via the 'Vibe Desktop', but it would be nice to deal them like other Excel-files.
    thx
    Martin

    Originally Posted by mschuhmann
    RTFM helps I admit:
    Novell Vibe 3.3 Administration Guide > Site Setup > Setting Up Site-Wide Customizations > Configuring File Associations for Edit in Place Applications
    Novell Doc: Novell Vibe 3.3 Administration Guide - Configuring File Associations for Edit in Place Applications
    Append ".xlsm" for the variable edit.in.place.file.applet.extensions, edit.in.place.file.webdav.extensions
    Hi Martin,
    Yeah, the Vibe docs can help on occasion
    Still, thanks for feeding it back to the forums as it can be quicker finding a hit in the forums than having to go through the docs!
    Cheers,
    Willem

  • Unzip multiple bzip files thru powershell

    Hello there-
    I have 50 directories. Each directory has 10 sub directories in which there are 300 bz2 files. I would like to unzip them thru bzip program. Is it possible to do so with powershell/batch/cmd line script?
    Dir1>Subdir1>*.bz2
          >Subdir2>*.bz2
          >Subdir10>*.bz2
    Dir2>Subdir1>*.bz2
          >Subdir2>*.bz2
          >Subdir10>*.bz2
    Thanks,
    Ben

    Hi,
    To unzip files, I would like suggest you refer below code, those code is to find all current location zip files and unzip them to the current location:
    $shell=new-object -com shell.application
    $CurrentLocation=get-location
    $CurrentPath=$CurrentLocation.path
    $Location=$shell.namespace($CurrentPath)
    $ZipFiles = get-childitem *.zip
    $ZipFiles.count | out-default
    foreach ($ZipFile in $ZipFiles)
    $ZipFile.fullname | out-default
    $ZipFolder =
    $shell.namespace($ZipFile.fullname)
    $Location.Copyhere($ZipFolder.items())
    If you want to unzip many location files, we could use get-childitem to get all of them and saved in a variable.
    For more details, please refer to the below link:
    PowerShell script to unzip many files
    http://www.techiebirdsnest.com/2009/01/powershell-script-to-unzip-many-files.html
    Hope this helps.
    Regards,
    Yan Li
    Yan Li
    TechNet Community Support

  • CFZIP can't unzip FTP'd file

    When I try to unzip a zip file that was FTP'd to my server I
    get an error:
    Ensure that the file is a valid zip file and it is
    accessible. Cause : java.util.zip.ZipException: error in opening
    zip file
    I can open the zip file through windows with no issue so this
    has to do with what CF uses to open the file. I also extracted the
    files in the zip file and then created a new zip file on my own and
    CF can unzip that file fine as well.
    Does ftp'ing a file cause some kind of change with the file
    that would cause the exception?

    jsg1000 wrote:
    > When I try to unzip a zip file that was FTP'd to my
    server I get an error:
    >
    > Ensure that the file is a valid zip file and it is
    accessible. Cause :
    > java.util.zip.ZipException: error in opening zip file
    >
    > I can open the zip file through windows with no issue
    Did you open the exact file that was FTP'd to your server or
    the initial
    file ? FTP files can be transferred in 2 modes: ascii and
    binary there
    is a possibility that the files was transferred in ascii and
    thus corrupted.
    > Does ftp'ing a file cause some kind of change with the
    file that would cause
    > the exception?
    It might be. Read about the ascii/binary mode for a ftp
    transfer for
    more info.
    Mack

  • HT201361 Is it possible to save the screenshot files to a different folder than desktop. How can I change the folder?

    Is it possible to save the screenshot files to a different folder than desktop (that is the default). How can I change the destination folder? Thank you, Sal

    To change the screenshot capture location to a new place on your Mac, first think of a location that would serve you properly. We like to place ours in a "Screenshot" folder located inside of the User's "Pictures" folder. To change the location to this new location, open the Terminal and enter the following command:
    defaults write com.apple.screencapture location /Users/[u]/Pictures/Screenshots/
    Replace "[u]" with the name of the user on your system. Once you have entered this command, let's restart the screen capture utility by restarting the SystemUIServer by entering the following command:
    killall SystemUIServer
    You can optionally log out and back in instead of entering this second command, thus restarting the SystemUIServer. Once restarted, all screen captures taken from here on out will end up in your /Pictures/Screenshots/ folder in the User's home folder on your Mac.

  • Is it possible to pickup a specific file from a folder?

    Hi
    I am wondering whether it is possible to pick a specific file from a folder. I have a shape where I have got a filename and I need to look for it in a folder.
    Is that possible?
    And how can I achieve this? The next step is to pick the file up and transfer it to another location. So basically in pseudo code I need to ask my defined folder with a filename as parameter. Get the file and move it to another folder.
    Suggestions are most appreciated. Thanks

    Assuming you are using orchestration, you could
    create an assembly, install it in the GAC, add a reference to it in your BTS
    project, and call it from an Expression shape to resolve the receive
    location. You would only really need one static method in a class. Be sure
    to add a reference to Microsoft.BizTalk.ExplorerOM.dll.
    Example:
    using Microsoft.BizTalk.ExplorerOM;
    namespace Phil
    public class OrchestrationHelpers
    public static string ResolveReceiveLocationName(string
    inboundTransportLocation, string receivePortName)
    BtsCatalogExplorer bts = new BtsCatalogExplorer();
    bts.ConnectionString =
    "SERVER=localhost;DATABASE=BizTalkMgmtDb;Trusted_Connection=True;Network
    Library=DBMSSOCN;"
    foreach (ReceiveLocation location in
    bts.ReceivePorts[receivePortName].ReceiveLocations)
    if (location.Address == inboundTransportLocation) return location.Name;
    return null;
    In your Expression shape within your orchestration, assuming a message
    called "MyMessage" and a string variable "receiveLocationName":
    receiveLocationName =
    Phil.OrchestrationHelpers.ResolveReceiveLocationName(MyMessage(BTS.InboundTransportLocation),
    MyMessage(BTS.ReceivePortName));
    If this post answers your question, please mark it as such. If this post is helpful, click 'Vote as helpful'.

  • Is it possible to use my music files in both my girlfriend's and my separate Itunes libraries through our seperate user accounts?? I want to import my music into her library with out copying the files onto my hard drive a second time....

    Is it possible to use my music files in both my girlfriend's and my Itunes library's through our seperate user account?  I want to import my music into her library without copying to my hard drive a second time.....

    Would any of these help you?:
    http://www.apple.com/itunes/inside-itunes/2011/05/two-ways-to-share-media-librar ies-through-itunes.html
    http://www.apple.com/itunes/inside-itunes/2011/01/keeping-multiple-itunes-librar ies-on-a-single-computerif-you-share-your-computer-with-others-and-you.html

Maybe you are looking for