![]() |
Importing data for CSV into Excel using VBA
Hello to all,
I have a question regarding CVS import. I need to do two tasks. First I need to select a range in a worksheet (could be 4 rows by 4 cols or more) and then create a CSV file with this range. I have about 30 such kinds of files. So I create 30 CSV files. Then what I need to do is, then import this data into another main excel sheet. I will need to put the rows/cols where to put the data. Hence I need two answers actually. The first would be to create the CSV file from the excel sheet (selected range) and then the second solution required to get the data back into another excel sheet. Any help, pointers and directions will be highly appreciated. Regds |
Importing data for CSV into Excel using VBA
1. Copy the range to be exported to a new workbook, starting in A1. Save
this workbook as a CSV file. 2. Open the CSV file using Workbooks("filename.csv").Open, then copy the used range of the newly opened file and paste it into the appropriate range in the target worksheet. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Basu" wrote in message oups.com... Hello to all, I have a question regarding CVS import. I need to do two tasks. First I need to select a range in a worksheet (could be 4 rows by 4 cols or more) and then create a CSV file with this range. I have about 30 such kinds of files. So I create 30 CSV files. Then what I need to do is, then import this data into another main excel sheet. I will need to put the rows/cols where to put the data. Hence I need two answers actually. The first would be to create the CSV file from the excel sheet (selected range) and then the second solution required to get the data back into another excel sheet. Any help, pointers and directions will be highly appreciated. Regds |
Importing data for CSV into Excel using VBA
Hi Jon,
Thank you for your response. That would be a good place to start. Do you have any code that can accomplish this? That would greatly help me get started. Look forward to your response. Regds Shuvro |
All times are GMT +1. The time now is 06:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com