User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Legacy and Other Languages section within the Software Development category of DaniWeb, a massive community of 332,587 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,230 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Legacy and Other Languages advertiser:
Views: 627 | Replies: 3 | Solved
Reply
Join Date: Jan 2007
Location: India
Posts: 186
Reputation: shouvik.d is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 6
shouvik.d's Avatar
shouvik.d shouvik.d is offline Offline
Junior Poster

Excel Workbooks from an Excel file

  #1  
10 Days Ago
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2008
Location: San Diego, California
Posts: 2
Reputation: elaurvick is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
elaurvick elaurvick is offline Offline
Newbie Poster

Re: Excel Workbooks from an Excel file

  #2  
8 Days Ago
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  
Join Date: Mar 2008
Posts: 6
Reputation: JobMatchNow is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
JobMatchNow JobMatchNow is offline Offline
Newbie Poster

Re: Excel Workbooks from an Excel file

  #3  
7 Days Ago
Is this way efficent and easy to learn?
Reply With Quote  
Join Date: Jan 2007
Location: India
Posts: 186
Reputation: shouvik.d is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 6
shouvik.d's Avatar
shouvik.d shouvik.d is offline Offline
Junior Poster

Re: Excel Workbooks from an Excel file

  #4  
6 Days Ago
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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Legacy and Other Languages Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Legacy and Other Languages Forum

All times are GMT -4. The time now is 1:00 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC