943,724 Members | Top Members by Rank

Ad:
May 6th, 2008
0

Excel Workbooks from an Excel file

Expand Post »
Hi All,

I am need of using a excel file as a standard template and then use a list of .csv files to populate certain rows and columns of this standard template and save it with a different name so that I can always reuse the standard template and it does not get altered..

Can anybody get me a solution. I prefer to use a VBA so as to have minimal effort to get the csv data and populate the excel.

Please help me.
Similar Threads
Reputation Points: 64
Solved Threads: 7
Junior Poster
shouvik.d is offline Offline
198 posts
since Jan 2007
May 8th, 2008
0

Re: Excel Workbooks from an Excel file

I do this manually with one of my files.
1) Back up your template!!!
2) Open the .csv file with Excel
3) Delete the columns you don't want and save the result with a temporary name as an .xls file.
4) Open the temporary .xls file, highlight the column or columns you want to copy, select "copy", open the template .xls file, highlight the columns to be replaced, and select "paste".
5) If the columns are not next to each other, you'll have to do this one column at a time.
6) Don't forget to make a backup before you start! It's easy to mess up with a manual process.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
elaurvick is offline Offline
3 posts
since May 2008
May 9th, 2008
0

Re: Excel Workbooks from an Excel file

Is this way efficent and easy to learn?
Reputation Points: 10
Solved Threads: 2
Light Poster
JobMatchNow is offline Offline
26 posts
since Mar 2008
May 10th, 2008
0

Re: Excel Workbooks from an Excel file

Hi All,

I could do this in the following manner

VB Syntax (Toggle Plain Text)
  1. Workbooks.Open Model_Template
  2. Workbooks(Master_Template).Activate
  3. Workbooks(Master_Template).Sheets("Master_Sheet").Select
  4. Workbooks(Master_Template).Sheets("Master_Sheet").Copy before:=Workbooks(Model_Template).Sheets("Sheet1")
  5. Workbooks(Model_Template).Sheets("Master_Sheet").Name = New_Name
  6. Workbooks(Model_Template).Save
  7. Workbooks(Model_Template).Close

Master_Template is the original template
Model_Template is the new file.

I used a while loop by which I could create 1272 new Excel Workbooks with the Master_template format but data content varying. It took some 30 minutes to create and populate the new 1272 Workbooks.
Reputation Points: 64
Solved Threads: 7
Junior Poster
shouvik.d is offline Offline
198 posts
since Jan 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Legacy and Other Languages Forum Timeline: Pascal's Triangle
Next Thread in Legacy and Other Languages Forum Timeline: MATLAB help please ?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC