ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Exporting selected data / automation (https://www.excelbanter.com/new-users-excel/46547-exporting-selected-data-automation.html)

dougb415

Exporting selected data / automation
 

Hello,

Like so many others, I am an Excel newbie. I was a mainframe COBOL
programmer in another life, but that was a few years back :rolleyes:

My manager would like me to write an app that will take data from an
existing Excel spreadsheet (generated by our system), select only a
handful of columns, write out a new spreadsheet with the selected data,
and then the new spreadsheet will be used as input to a new Access
database that I will create.

1) How do I select which columns I want to export? I tried highlighting
the columns and then doing a "Save As..." but that just gave me an exact
copy of the original spreadsheet, with the columns still highlighted.

2) Is there a way to automate #1? I have no idea how often my manager
will want to run this, but i don't want to have to hand-prep the data
every time.

Thanks in advance for any help!

-Doug


--
dougb415
------------------------------------------------------------------------
dougb415's Profile: http://www.excelforum.com/member.php...o&userid=27452
View this thread: http://www.excelforum.com/showthread...hreadid=469638


bigwheel

There are some parts of this question which could be difficult but to start
with, you could record the steps required using the Record New Macro option.
To select a column, click on the column header e.g. E. This will select the
whole column then click Copy then switch to a second blank workbook select
the first cell in the destination column and click paste. Repeat for the
other required columns. When finished, stop the macro recording. The
potential problem is that you mentioned that the existing spreadsheet is
"generated by our system". This, I guess, would be a new speadsheet which
will not have any macros in so you would need to copy the macro which you
recorded into the new generated sheet. Other than that and assuming the data
will always appear in the columns that you selected originally, you shouldn't
have a problem with #2

"dougb415" wrote:


Hello,

Like so many others, I am an Excel newbie. I was a mainframe COBOL
programmer in another life, but that was a few years back :rolleyes:

My manager would like me to write an app that will take data from an
existing Excel spreadsheet (generated by our system), select only a
handful of columns, write out a new spreadsheet with the selected data,
and then the new spreadsheet will be used as input to a new Access
database that I will create.

1) How do I select which columns I want to export? I tried highlighting
the columns and then doing a "Save As..." but that just gave me an exact
copy of the original spreadsheet, with the columns still highlighted.

2) Is there a way to automate #1? I have no idea how often my manager
will want to run this, but i don't want to have to hand-prep the data
every time.

Thanks in advance for any help!

-Doug


--
dougb415
------------------------------------------------------------------------
dougb415's Profile: http://www.excelforum.com/member.php...o&userid=27452
View this thread: http://www.excelforum.com/showthread...hreadid=469638




All times are GMT +1. The time now is 04:06 AM.

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