Solved

macro in excel to get a file

Posted on 2004-10-07
12
363 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

751 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