Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Export to Excel in Macro Post Reply Post New Topic
Author Message
infinitydreams
Newbie
Newbie


Joined: 24 Jan 2008
Online Status: Offline
Posts: 4
Quote infinitydreams Replybullet Topic: Export to Excel in Macro
     Posted: 24 Jan 2008 at 2:03am
Hi
 
My company has recently introduced Remedy as a new helpdesk management application which uses Crystal Reports in the backend to produce reports.
 
The issue we have is when reports are exported to Excel the formatting is obviously all over the place and even with tweaks here and there it couldn't be sent straight to customers.
 
So is there a way of when you export a Crystal Report to Excel you include a standard Excel Macro? We could then create a simple Excel Macro and use the Auto_run command so that when a customer opens the file it re-formats into the correct layout and style.
 
Look forward to hearing from you!
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 24 Jan 2008 at 10:51am
AFAIK, there is no way to do this.  Formatting reports to export correctly to Excel can be a challenge.  Do you have the ability to edit the report that your software uses?  If not, could you send .PDF files instead?  (The export to PDF looks much better!)
 
If you can edit them, you would need to go into the report in Crystal and do the following:
 
1.  Make the column headings and the data under them exactly the same width.
 
2.  If any of your column headings are more than one line high (by actual text, not by the height of the text block) then they ALL must have the same number of lines of text.  Your best bet is to try to make them just one line high.
 
3.  Line up you column headings and data so that the left sides are at exactly the same place.
 
Most of the time following these steps will cause the report to line up as desired when exporting to Excel.
 
-Dell
 
IP IP Logged
infinitydreams
Newbie
Newbie


Joined: 24 Jan 2008
Online Status: Offline
Posts: 4
Quote infinitydreams Replybullet Posted: 25 Jan 2008 at 1:50am
Problem is in Excel we have fairly specific formatting that includes charts and tables.
 
Via a Macro these can be updated but the idea was to be able to get all the data into an excel file that contains the macro and then auto sent out to customers. Them upon the customer opening the report it runs the macro and formats the report correctly.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum