[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

macro in excel to get a file

Posted on 2004-10-07
12
Medium Priority
?
368 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
9 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 1000 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 1000 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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 

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
 
LVL 101

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 101

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

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.
Suggested Courses

612 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