+ Reply to Thread
Results 1 to 9 of 9

Use the Excel-File as file storage (possible?)

  1. #1
    Registered User
    Join Date
    06-19-2015
    Location
    Switzerland
    MS-Off Ver
    Office 2013 and 2007
    Posts
    5

    Question Use the Excel-File as file storage (possible?)

    Hello everyone

    I’m new in this forum and I have a “short” question. I’ve been searching for some time in the internet for a solution, but I haven’t found a good way to solve my problem yet. It may be, because I don’t really know the terms I should search with.

    But, to my question:
    Since version 2007, office saves files in a kind of zip-archive, which you can also extract by your own. If Excel opens a file, does the application extract this file to somewhere on the hard disk to use it (as long as the file is open in Excel) or does Excel it only load into the RAM?

    The background to this question is, that if the structure in the zip-file is saved on the hard disk and Excel reads and writes its xml-files into this structure and when you save the workbook, this structure gets packed back into the xlsx-file, then you could add other files (like pdf’s or 3D-data, …) into this structure, which where embedded in the xlsx-file. In this case, I could access this files with Excel itself (access with VBA to the path).
    The advantage of this idea would be, that you can “guarantee”, that the files you added are “always” with the xlsx file (because they are included) . If I want to share the Excel-file, I don’t have to copy the other files with the xlsx to share them (this is a disadvantage of a normal hyperlink ).

    I hope that Excel works this way, and of course that someone would know something about that to help me

    I really appreciate any help you can provide.

    With kind regards, Ramon

    PS: If you find any spelling mistakes or other grammar mistakes, which belong to my English skills, you can keep them

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Use the Excel-File as file storage (possible?)

    Hi, welcome to the forum

    firstly, your english is excellant (and everyone makes spelling mistacks lol)

    Short answer, the only thing that gets saved, when you save a excel file (.xls/xlsx etc), is that file, along with any data, formulas, links
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    06-19-2015
    Location
    Switzerland
    MS-Off Ver
    Office 2013 and 2007
    Posts
    5
    Quote Originally Posted by FDibbins View Post
    Hi, welcome to the forum

    firstly, your english is excellant (and everyone makes spelling mistacks lol)

    Short answer, the only thing that gets saved, when you save a excel file (.xls/xlsx etc), is that file, along with any data, formulas, links

    Hi, FDibbins

    Thank you for your reply

    That means, my idea doesn't work this way...?
    Do you have another idea/possibility to embed various files in Excel, which I could read (open, extraxt) and write (import) dynamicly by using VBA?

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Use the Excel-File as file storage (possible?)

    This is actually quite an interesting idea and I can see the appeal of it. Have you tried doing it manually? The thing I'd be cautious of is whether excel rebuilds the full folder structure or not and in doing so removes any comtained files.

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Use the Excel-File as file storage (possible?)

    If you can find the Auto Recovery file, you might have some luck. I found a file in C:\Users\username\AppData\Roaming\Microsoft\Excel that was created at the exact time that I opened a file in Excel. It was however too small to be the "un-zipped" version of the file that I opened. I did however find a file in C:\Users\username\AppData\Local\Temp that is suspiciously in the right size range and timestamp to be the actual temp file created.

    I hope that this helps.

    In order to do what you want, I think that you would have to have a very intimate knowledge of how the archive is actually created upon save and unpacked for use.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Use the Excel-File as file storage (possible?)

    Here is a zipped file of an Excel file that I unzipped. I did this because my first attempt to see inside the xlsx file resulted in not getting the whole thing. I hope that the zip maintains the structure that the unzipping revealed.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-19-2015
    Location
    Switzerland
    MS-Off Ver
    Office 2013 and 2007
    Posts
    5

    Re: Use the Excel-File as file storage (possible?)

    Hello together

    Thank you for your replies. Today, I tested to add a file manually to the xlsx-file and it seems, that Excel doesn’t accept other files or even other folders in its structure.

    So, I think, this won’t work in that way…

    But does someone have another idea to add files to an Excel-file? I already had a look at alternate-data-stream, but I think that’s not that what I want. As I understood, this works only on ntfs-formatet systems and not over (for example) e-mails.

    Thank you for any help or ideas

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Use the Excel-File as file storage (possible?)

    The header system of an Excel file is very complex and I think that you would probably have to re-write Excel to accomplish what you want to do.

    To join text files using DOS commands is easy. This copies file1.txt and file2.txt and creates file3.txt: copy file1.txt + file2.txt file3.txt

    Joining Excel files with a method like this doesn't work at all. The Excel file archive "package" is complex and probably all the parts would have to be properly joined in order to stand a chance of combining the files.

  9. #9
    Registered User
    Join Date
    06-19-2015
    Location
    Switzerland
    MS-Off Ver
    Office 2013 and 2007
    Posts
    5

    Question Re: Use the Excel-File as file storage (possible?)

    Hey there again

    I found a way (which isn’t very elegant, but works in a way) to add a file to the xlsx-file. The problem is now, that the xlsx-file is locked, because it’s loaded in Excel (of course). If I could access from the same xlsx-file, in which I want to add a file to, then I could add another file to the archive without error message when I load the file.

    The way I found is, that I insert an object in Excel to the xlsx-file (Insert-Object-From File). This creates an additional structure in the xlsx-archive, which includes the folder “\xl\embeddings”. In that folder, I can add any file, which is a .bin file (this new file is accepted from Excel). When I want to export this embedded files, I only have to change the extension to the one of the file.

    The only problem now is, that I can only read this files, while the xlsx-file is open in Excel, but I can’t write new files into the xlsx-file from the file itself.

    If I could solve this problem, I could implement my idea… :D

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Convert txt. file to excel file <>excel to txt. File Layout 116 characters - price databas
    By costi_linho12 in forum Excel Programming / VBA / Macros
    Replies: 61
    Last Post: 10-05-2015, 01:33 PM
  2. Replies: 4
    Last Post: 10-23-2013, 12:54 AM
  3. Cloud Storage Excel File Does Not Download
    By danleonida in forum Excel General
    Replies: 2
    Last Post: 08-14-2012, 04:16 PM
  4. Creating a .txt file extracting information from a Excel file saving as .resx file
    By AbdallahHajbed in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-19-2012, 09:00 AM
  5. Excel for file storage and reports?
    By Rick-O-Shay in forum Excel General
    Replies: 0
    Last Post: 12-31-2009, 08:04 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1