Excel trendline

Hi,
How can I create a trend line in a chart?

Aspose.Excel Chart API doesn't support this feature now. You can create a trendline in your designer file and use Aspose.Excel to import it.

If setting trendline at run time is important in your application, please let me know. We will add it in our work list.

Yes is very important to my application, but I’m hurry, so, please tell me how to “import” from the designer.

Thank you,
Cristian

Hi Cristian,

It will take about 2 weeks to implement trendline feature.

If you want to import from a designer file, you can try this:

1. Create a chart with trendline in an Excel file
2. Use Excel.Open method to import it
3. Change source data at run time.

Hi,
I already tried it but in my worksheet I don’t see any chart from my template.Why?
Can you send my an example?

Thanks

The following is my sample code:
Excel excel = new Excel();
excel.Open("c:\\book1.xls");
excel.Worksheets[0].Cells["B1"].PutValue(8);
excel.Worksheets[0].Cells["B2"].PutValue(7);
excel.Worksheets[0].Cells["B3"].PutValue(6);

excel.Save("abc.xls", SaveType.OpenInExcel, FileFormatType.Default, this.Response);

And you can download the designer file at `http://www.aspose.com/Products/Aspose.Excel/Fixes/book1.xls`

If it still cannot work, please check your edition of Aspose.Excel. If you buy the Basic edition of Aspose.Excel, you have to upgrade to Professional edition. Basic edition doesn't support chart feature.

Or you can try the latest hotfix at

Hi,
1. You told me that you can fix the trendline problem in two weeks, it’s true?
Because the company I work want to buy your components (excel and word) but we need this feature (trendline).

Thank you

Yes. Adding trendline at runtime feature will be available before the end of this month.

Now it’s available. Please download v2.8.1 and check the API reference at http://www.aspose.com/Products/Aspose.Excel/Api/Aspose.Excel.Trendlines.html.

Thank you very much!
It’s work very well.

Cristian