| | |
Excel Workbooks from an Excel file
Thread Solved |
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.
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
Shouvik
•
•
Join Date: May 2008
Posts: 3
Reputation:
Solved Threads: 1
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.
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.
Hi All,
I could do this in the following manner
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.
I could do this in the following manner
VB Syntax (Toggle Plain Text)
Workbooks.Open Model_Template Workbooks(Master_Template).Activate Workbooks(Master_Template).Sheets("Master_Sheet").Select Workbooks(Master_Template).Sheets("Master_Sheet").Copy before:=Workbooks(Model_Template).Sheets("Sheet1") Workbooks(Model_Template).Sheets("Master_Sheet").Name = New_Name Workbooks(Model_Template).Save 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
Shouvik
![]() |
Similar Threads
- opening an Excel file in VB.NET (VB.NET)
- how to link an excel program in vb.net? (VB.NET)
- vb6-excel problem (Visual Basic 4 / 5 / 6)
- problem in importing table into Excel (VB.NET)
- Open file from listbox (Visual Basic 4 / 5 / 6)
- Server exception when opening a excel file in VB.net (VB.NET)
- Open Excel in VB6 (Visual Basic 4 / 5 / 6)
- Open Excel file from Visual Basic (Visual Basic 4 / 5 / 6)
- Using Microsoft Excel 10.0 Libary Object -Dang .dlls (C#)
Other Threads in the Legacy and Other Languages Forum
- Previous Thread: Pascal's Triangle
- Next Thread: MATLAB help please ?
| Thread Tools | Search this Thread |





