This project has moved and is read-only. For the latest updates, please go here.

Axis Option

Jul 5, 2011 at 7:14 AM

I need to change the axis options through code at the run time.

The following is possible if I open the worksheet in Excel.

E.g.  In case of a Bar Chart, right click on Y-Axis, Click Axis option and I have to click the check box (Categories in reverse Order).

Is this possible through code during run-time? If yes then how?

Please help.

Jul 6, 2011 at 1:58 PM

I dont understand your problem. What do you mean about "run-time" ? When you are generating excel file or when you are using excel?!

You can generate your excel file as you like, after user change any option in your aspx form and press a "Ok" button for example, you get all form values and do as you want.

Jul 6, 2011 at 2:19 PM

Thanks for the reply.

You may have noticed that when ever you generate a Bar chart (nothing to do with EPPLUS at this stage) in EXCEL the data (bars) plotted is from highest row bar coming at the top of the chart and the first row bar coming at the bottom.

E.g If the data range is A1:A15, the A15 bar shall be plotted at the top and A1 at the bottom.

In orde to change this, excel provides a feature which I have mentioned in my previous post (right click on Y-Axis, Click Axis option and  click the check box "Categories in reverse Order") which reverses the order and First row bar comes to top and last row bar goes to bottom in the chart.

I was wondering if there is an option in EPPLUS, which I can use after generating the EXCEL and before saving it in my code (c#).

I hope it is now clear.