473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Open Multiple Excel Sheets - Automatic Save and Close - Data Updatation

Hi,

I have several excel sheets in Office 2007, which has all kinds of standard calculations, and a consolidated Excel Sheet with totals and rollup of all the other excel files. The issue I am facing is that in order to get the updated totals in the Rollup File, I have to open all the primary excel files one by one, click on update, save and then close them. Once this is done, the rollup file shows the calculations correctly. Is there a VB script or a batch file I can use which will automatically open, update, save and close all the file in one go and the all I have to do is open the consolidated sheet to take the rollup of all the files.
May 18 '07 #1
1 7782
danp129
323 Expert 256MB
Hi,

I have several excel sheets in Office 2007, which has all kinds of standard calculations, and a consolidated Excel Sheet with totals and rollup of all the other excel files. The issue I am facing is that in order to get the updated totals in the Rollup File, I have to open all the primary excel files one by one, click on update, save and then close them. Once this is done, the rollup file shows the calculations correctly. Is there a VB script or a batch file I can use which will automatically open, update, save and close all the file in one go and the all I have to do is open the consolidated sheet to take the rollup of all the files.
You should start by recording a macro.
While recording:
Open an existing file
*calculate (F9?)
Save the file
Close the file
stop the macro

If excel is set to recalc before save (default in 2003) you may not have to calculate manually before you save and close.

Try to write what you need using the code the macro recorded as an example then post again if you run into an issue.

If the filenames you need to open change on a regular basis and you can't hard-code which files to open then give some examples of the filenames. Include the code you just recorded and cleaned up, and in CODE tags (# sign in message toolbar) as well.
May 18 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
16
by: LP | last post by:
Hello, I am trying to use .NET with Excel. I installed Office 2003 and selected ..NET programming suport option, so it installed all those PIA, as MS sugests. But I can not find a way to destroy...
1
by: =?Utf-8?B?QnJpYW5ESA==?= | last post by:
I have been given the task, to take an excel document with over 50 sheets and is updated weekly, and pull from it 5 of those sheets, convert them to html so they can be viewed on our company web...
4
by: =?Utf-8?B?QnJpYW5ESA==?= | last post by:
Hi Does anyone know of a way (via code behind) to pull a single sheet out of a Excel workbook and convert it to a stand alone html document? Thanks Brian
3
by: pleaseexplaintome_2 | last post by:
using the code below (some parts not included), I create a new excel workbook with spreadheets. I then want to delete a spreadsheet, but a reference remains open and excel stays in task manager...
13
by: chuckie_9497 | last post by:
hello all you gurus. I am struggling with releasing com objects. I have isolated the problem to the code below. Objects are released and the process ends until I use "int k = sheet.Count;" Then...
0
by: Vader | last post by:
I am new to this forum. Thanks in advance for and help. The following is what I am looking for: 1. I need help with VB code to open a MS Word (.doc) file. 2. Read lines from the MS Word (.doc)...
4
by: Scott | last post by:
I'm trying to get access to open, refresh and then close an excel spreadsheet for me. Below is the code I'm using to open and close Excel, I just can't get it to refresh my data linked back to my...
1
by: DennisBetten | last post by:
First of all, I need to give some credit to Mahesh Chand for providing me with an excellent basis to export data to excel. What does this code do: As the title says, this code is capable of...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.