Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have been doing some work in UNIX. The results come out as a larg .csv text file (delimited by a comma). To look at the results I like to import it into EXCEL. When I get int Excel I have to format the report alot so I craeted a macro which I ca run each time. Still no problem. Because the csv file changes regularly this means the macro has t change so I decided to create the macro's visual basic command automatically whilst doing my work in UNIX and store them in a tex file (macrofile.txt). Everythings still going well and now I can manually open the .csv i EXCEL and manually import the macrofile.txt into the Visual Basi editor and then run it. Thats great manually. So my question is how can I automate the openning of the .csv with th macrofile.txt and then run the macrofile? (Tried recording my action of imprting the macro but it does not work - as you can see I'm prett new to this). Please please help. Ni -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You seem to have a CSV file; if your use extension CSV instead of TXT in your file name, you can open the file using File ! Open in Excel WITHOUT any macros
Your CSV file must comply: it must have 1<=rows<=65536 and 1<=cols<=256; anything outside these limits will be discarded |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nik
I am also doing something like this and much more. However I have been able to do what you want. I am stuck with writing the output file. Anyway this is what you need to do if you need to automate your macr 1. Invoke exce 2. go to tools and macro and Record macro (Give a name to macro 3. Now open your csv file (note your macro is still recording) 4. Do whatever formatting you are want to do 5. Stop recordin 6. Clear all the data and undo all formatting you have and come back to the blank worksheet mode that you first opene 7. Do a file save as and coose template for file typ 8. Note that you have a .xlt file in excel's templates folder which you can reach each time you open excel and click on new 9. Now if you want to fully automate this then the name of the macro should be Auto_Open so that when clik on the .xlt file it starts the macr Hope that help |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the last reply.
the trouble is my macro actions change from file to file so I canno have a single set of constant actions. I need to import the specific Macro actions for each file but I cann oseem to automate that impor -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need to stop automatic column re-sizing when importing XML data | Excel Discussion (Misc queries) | |||
Problem importing external data / Automatic publishing webpage | Excel Discussion (Misc queries) | |||
Importing data via macro | New Users to Excel | |||
importing data using a macro | Excel Discussion (Misc queries) | |||
importing data using a macro | Excel Programming |