• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Graphs export to PDF

Hi,

I am stuck with a serious problem of exporting my graphs on a single sheet to a PDF file.
When I export the sheet as PDF I am unable to control the number of graphs per page due to which some part of graph moves to next page.

Refer to the below SS of PDF report at the bottom of Page 1 and start of Page 2.

graph.JPG

It is a large VBA based project and this is the final step of exporting these several graphs to PDF report.

Please help its urgent.

Regards
Ehtisham Ali
 
Hi Ehtisham,
Can you post your file with sample data?
We can't find out the problem with screen short.

Regards,
 
Hi Khalid,

Please find attached my macro and attached sample file. Please first convert this sample file in csv format since the tool is so designed to except CSV files only. I can't upload CSV file here due to some restrictions.


Regards
Ehtisham Ali
 

Attachments

  • Graph_Automation_Tool_test.xlsm
    55 KB · Views: 23
  • sample_data.xlsx
    22.3 KB · Views: 13
Hi Ehtisham,

I was not expecting such huge work out. Good work.

Well...
Problem is your charts having different sizes.

I just applied 2 things and getting the result much better:
1) Increased the top / bottom margins:
Chart Print.PNG

2) applied 4 top rows repeated on each page.

so that your all pages will become same size. (i hope so)

I have done all this manually, can you do this with code?


Or you can wait till one of our member do something better.

Regards,
 
Humble Request

Khalid please do not populate the sample data elsewhere since it is my organizations internal data. I hope you can understand.

Regards
 
Hi Khalid,

I have focused and modified the code in the way to control only three graphs per page and formatted the pagelayout to A4. This solved my problem.

For the above I applied a FOR loop to count no of graphs copied and after each 3rd graph added a 5 lines space this way it perfectly adjusted.


Thanks for your valuable suggestions.

Regards
Ali
 
Hi Khalid,

I have focused and modified the code in the way to control only three graphs per page and formatted the pagelayout to A4. This solved my problem.

For the above I applied a FOR loop to count no of graphs copied and after each 3rd graph added a 5 lines space this way it perfectly adjusted.


Thanks for your valuable suggestions.

Regards
Ali


Oh great, glad you have done it....
You welcome.
 
Back
Top