ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   export colum to bat file (https://www.excelbanter.com/excel-worksheet-functions/7724-export-colum-bat-file.html)

CB

export colum to bat file
 
I am using a db qry in excel to populate 2 columns of data. I then use a
concatenate function to combine that column with a copy command to get a
usable statement (copy file location). Is there a way after a data refresh
to automatically export the concatenated column into a bat file?



Frank Kabel

Hi
try recording a macro while doing this manually

--
Regards
Frank Kabel
Frankfurt, Germany

"CB" <cblairATfargo.com schrieb im Newsbeitrag
...
I am using a db qry in excel to populate 2 columns of data. I then

use a
concatenate function to combine that column with a copy command to

get a
usable statement (copy file location). Is there a way after a data

refresh
to automatically export the concatenated column into a bat file?




CB

I tried this, but once you leave excel it doesn't record the macro anymore.
Also there is not, afaik, an option to save to bat in excel..

"Frank Kabel" wrote in message
...
Hi
try recording a macro while doing this manually

--
Regards
Frank Kabel
Frankfurt, Germany

"CB" <cblairATfargo.com schrieb im Newsbeitrag
...
I am using a db qry in excel to populate 2 columns of data. I then

use a
concatenate function to combine that column with a copy command to

get a
usable statement (copy file location). Is there a way after a data

refresh
to automatically export the concatenated column into a bat file?






TheManWho

I know this is an old post but I have something that might help,
If you have a batch file already created and ask Excel to open the batch file then you can get Excel to paste/export the information into the file at your own commands through the macro.

However I have fallen short of finishing my own goals that I had in mind by using excel to string LDAP scripts together, piecing certain strings and input variables to create the complete string. This is repeated through the document creation 60 scripts that I have successfully exported to a batch file, however I am struggling with the Forced format that excel then places around a Excel edited batch file. Excel puts " " marks around the scripts that I have created rendering them useless.

If someone can advise how to stop Excel from Force Formatting my scripts in the batch file, I would be happy to share my code to actually setup the macro for the batch file.


[quote=CB;24732]I tried this, but once you leave excel it doesn't record the macro anymore.
Also there is not, afaik, an option to save to bat in excel..


All times are GMT +1. The time now is 06:16 PM.

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