Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a list of queries in an excel workbook which need to be run on DB2 database and I am looking for a macro which can run these queries and save the data in txt files. The output of these queries is more than 100K records so I want to save it in txt files. Please let me know if this is possible. If so, can you please let me know the connection string and syntax to export the data to txt files. Please let me know on this. Thanks, Mahesh |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The best way is to record a macro while doing the query manually. go to tool
Menu - Macro - Record new macro. The go to Data Menu- Import Externa data - New Database Query. Run the Query. Then stop the macro. You can also save the reults in a textt file as part of the recorded macro. I would recommend savving the files as a CSV file instead of text. The CSV file is text but seperates the columns with commars which is easier to read be other programs. the go to "Mahesh" wrote: Hi, I have a list of queries in an excel workbook which need to be run on DB2 database and I am looking for a macro which can run these queries and save the data in txt files. The output of these queries is more than 100K records so I want to save it in txt files. Please let me know if this is possible. If so, can you please let me know the connection string and syntax to export the data to txt files. Please let me know on this. Thanks, Mahesh |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extract Data from Text Files | Excel Programming | |||
Extract Data from Multiple Excel Files | Excel Discussion (Misc queries) | |||
Help extract numerous text files and how to use avg formula | Excel Worksheet Functions | |||
extract text from html files | Excel Discussion (Misc queries) | |||
Extract Text From Multiple Word Files | Excel Programming |