Any or all of these items can be done with a macro. Are you ready to learn macro programming?

Step 1: Determine how you want the macro to run? In other words, determine a sequence of steps that can be performed against all documents. If you can simply import an existing file into a single document, perhaps that is the way to go. Is it better to open each file and then copy the sheets one at a time, etc...

Step 2: Break the problem into steps that you can learn. For example: Enumerate the files in a directory...

Step 3: Find a place to obtain help with Macros (or pay someone to write the macro). The community forum, for example, is a good place to ask questions of this nature.

http://user.services.openoffice.org

Christian Liebig wrote:
Hi Brian,

thanks very much for your reply, both alternatives work fine. But if you work with a lot of files, let`s say 20 - 50, to be combined and you have to do that job once every 2 weeks it would be cool to find a more effective way to do it. That is why I am looking for a way to kind of automate this. The batch import was just one idea, because the files to be imported will always be in one folder and will always have the same names. I do not necessarily need all the data combined in one file, it would also be OK just to import certain columns from the original files to my main document. Is that somehow possible, maybe with a macro?

Kind regards,

Christian





Brian Barker wrote:
At 15:45 07/08/2008 +0100, Christian Liebig wrote:
I am new to this list and I hope this is the right place for the following problem:

Very probably!

I have several Excel files, each containing 1 sheet. I would like to combine them to 1 spreadsheet document where each file should be converted to a sheet in the new document. All original files are in 1 folder so my idea is to do some kind of batch import but I have no idea how to do that.

I don't know any batch facility. Unless you have too many files, try one of these:

o  Open your first document in Calc.
For each subsequent document:
o  Select a sheet adjacent to where you want the next one to appear.
o  Go to Insert | Sheet From File... .
o  Browse to the next document file.
o  Select Before or After current sheet under Position.
o Under Sheet | From file, select the sheet(s) of the new document that you wish to insert. (You can select multiple sheets using Ctrl+click.)
o  Press OK.

Alternatively:
o  Open your first document in Calc.
For each subsequent document:
o  Open the document in Calc.
o  Select the sheet you wish to copy.
o  Go to Edit | Sheet > | Move/Copy... .
o  Under "To document", select your main document.
o Under "Insert before", select your desired position for the insertion.
o  Ensure that Copy (at the bottom of the panel) is ticked.
o  Press OK.

I trust this helps.

Brian Barker


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to