Solved

macro in excel to get a file

Posted on 2004-10-07
12
359 Views
Last Modified: 2012-05-05
I dont know how to implement this. I am exporting a crystal report to excel sheet and shall save it to a destination folder called CRexcel. Everytime I run the report,I am going to save it in this same folder. But I want to get that file (excel file) and have to do some sorting and some formatting.
What needs to be done to go get that file and implement some formatting and sorting on that file.

I would really appreciate a quick response.


thanks in advance!

0
Comment
Question by:asnath
  • 3
  • 2
  • 2
  • +1
12 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 250 total points
ID: 12252294
I don't think this can be done from Crystal.  It could be done from a front-end application.

mlmcc
0
 
LVL 42

Assisted Solution

by:frodoman
frodoman earned 250 total points
ID: 12252434
I agree, this cannot be done from Crystal.  Once you finish the export Crystal cannot interact w/ that Excel file any longer - it's a one way feed.

There are lots of applications that can read from Excel and manipulate it from there.  You could, for example, create a filesystemwatcher option in vb.net and have it fire off a small application whenever a new Excel file hits this folder.  Most application languages that I know of have similar functionality and you may want to do some searching in the forum for whichever language(s) you prefer.

frodoman
0
 
LVL 10

Expert Comment

by:ebolek
ID: 12252569
You can create anet application. Open the excel and format it as you wish
0
 

Author Comment

by:asnath
ID: 12254352
hi ebolek

Can u help me with the code for the net application or in the VBA editor.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 100

Expert Comment

by:mlmcc
ID: 12255362
Here is a way to get the basic code required.

Open the spreadsheet
Start recording a macro
Click TOOLS --> MACROS --> RECORD NEW MACRO
Give it a name - Doesn't really matter but remember it
Go through the steps you desire for the macro
Stop the recording (STOP Button on the macro recording popup)

Open the macro for editting
Click TOOLS --> MACRO --> MACROS
Select the macro and click EDIT

The code you see is the basic code you need from VB or VBA

mlmcc
0
 

Author Comment

by:asnath
ID: 12256035
hi mlmcc
thanks for the response. I would like to know one more thing.I am going to use the same macro for all the excel files.So how do i run the same macro for the other excel file.

Thanks a lot !

 
0
 
LVL 42

Expert Comment

by:frodoman
ID: 12257579
You can edit the macro code and then copy & paste it into other worksheets.

There is a way to use external macros as well so you could create on worksheet that contains the macro and then in each new Excel file you could reference and run the macro from the "master" worksheet.  You'd probably need to seek details in the Excel forum but also this is likely more trouble then simply copy & pasting.

frodoman
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 12454737
Solved the basic problem  frodoman probably solved the followon question

mlmcc
0
 
LVL 10

Expert Comment

by:ebolek
ID: 12462765
Agreed
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now