Excel Workbooks from an Excel file

Thread Solved

Join Date: Jan 2007
Posts: 200
Reputation: shouvik.d is an unknown quantity at this point 
Solved Threads: 6
shouvik.d's Avatar
shouvik.d shouvik.d is offline Offline
Posting Whiz in Training

Excel Workbooks from an Excel file

 
0
  #1
May 6th, 2008
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.
Regards
Shouvik
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 3
Reputation: elaurvick is an unknown quantity at this point 
Solved Threads: 1
elaurvick elaurvick is offline Offline
Newbie Poster

Re: Excel Workbooks from an Excel file

 
0
  #2
May 8th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 26
Reputation: JobMatchNow is an unknown quantity at this point 
Solved Threads: 2
JobMatchNow JobMatchNow is offline Offline
Light Poster

Re: Excel Workbooks from an Excel file

 
0
  #3
May 9th, 2008
Is this way efficent and easy to learn?
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 200
Reputation: shouvik.d is an unknown quantity at this point 
Solved Threads: 6
shouvik.d's Avatar
shouvik.d shouvik.d is offline Offline
Posting Whiz in Training

Re: Excel Workbooks from an Excel file

 
0
  #4
May 10th, 2008
Hi All,

I could do this in the following manner

  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.
Regards
Shouvik
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Legacy and Other Languages Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC