Solved

macro in excel to get a file

Posted on 2004-10-07
12
364 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 101

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
On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

 

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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

635 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