ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to Import Selected Data (https://www.excelbanter.com/excel-programming/343844-how-import-selected-data.html)

roy_ware

How to Import Selected Data
 
.....from an Excel CSV file into my Excel/VB Macro application.

Briefly, I have developed an Excel application that runs as a macro -
completely hiding Excel. I have another application (not written by me) that
exports its data into a comma delimited file readable by Excel. I wish to
extract certain columns from that particular file, compare it to the data
that is already stored in my application, updating the fields as necessary.

My initial idea is to completely load this huge file into a worksheet within
the application, strip it down to the necessary columns, and then
programatically compare data, inserting and deleting where necessary.

Patrick Molloy[_2_]

How to Import Selected Data
 
It would easier if your data was also saved as a delimited file. you then
just diff the files. Its definitely not optimum to have your data within the
application.
You could achieve the same result with an Access application. The beauty of
MS Access is that you can very easily import a csv file to a temporary table
and use a simple update query to amend your base data.

You would need to open teh csv file within excel. and then using a VLOOKUP
map your data to the imported data, changing your data where applicable.


"roy_ware" wrote:

....from an Excel CSV file into my Excel/VB Macro application.

Briefly, I have developed an Excel application that runs as a macro -
completely hiding Excel. I have another application (not written by me) that
exports its data into a comma delimited file readable by Excel. I wish to
extract certain columns from that particular file, compare it to the data
that is already stored in my application, updating the fields as necessary.

My initial idea is to completely load this huge file into a worksheet within
the application, strip it down to the necessary columns, and then
programatically compare data, inserting and deleting where necessary.


roy_ware

How to Import Selected Data
 
Aye - Access is a much better product for this application, but the company
is too cheap to spring for it - so I am left trying to solve it with Excel.

Thanks for the vlookup idea - hadn't occured to me.

"Patrick Molloy" wrote:

It would easier if your data was also saved as a delimited file. you then
just diff the files. Its definitely not optimum to have your data within the
application.
You could achieve the same result with an Access application. The beauty of
MS Access is that you can very easily import a csv file to a temporary table
and use a simple update query to amend your base data.

You would need to open teh csv file within excel. and then using a VLOOKUP
map your data to the imported data, changing your data where applicable.


"roy_ware" wrote:

....from an Excel CSV file into my Excel/VB Macro application.

Briefly, I have developed an Excel application that runs as a macro -
completely hiding Excel. I have another application (not written by me) that
exports its data into a comma delimited file readable by Excel. I wish to
extract certain columns from that particular file, compare it to the data
that is already stored in my application, updating the fields as necessary.

My initial idea is to completely load this huge file into a worksheet within
the application, strip it down to the necessary columns, and then
programatically compare data, inserting and deleting where necessary.



All times are GMT +1. The time now is 09:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com