Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing Text File Data into Excel where records span several row Razorback76 Excel Discussion (Misc queries) 2 June 25th 06 06:36 AM
Importing Microsoft query data into excel changes linked rows Wazzy_bear Links and Linking in Excel 1 December 19th 05 09:09 AM
Excel Macro to Copy & Paste [email protected] Excel Worksheet Functions 0 December 1st 05 01:56 PM
Importing data to Excel using MS Query John Excel Discussion (Misc queries) 1 November 17th 05 06:19 PM
importing data from Excel worksheet to another worksheet jbrick Excel Worksheet Functions 0 August 11th 05 05:51 PM


All times are GMT +1. The time now is 10:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"