We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How can i draw this line in excel? (use aspose)

i will draw lines like in this file

i want to know how

please help

Hi,

Please see the code below that adds a line.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\source.xlsx”;


Workbook workbook = new Workbook();


Worksheet worksheet = workbook.Worksheets[0];


Aspose.Cells.Drawing.LineShape shape = worksheet.Shapes.AddLine(3, 100, 3, 100, 100, 12);


workbook.Save(filePath + “.out.xlsx”);

Screenshot:

thank you but

i need a rise line

help please

Hi,

It seems like you will have to rotate the line to make it rise.

See the following code and the output file.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\source.xlsx”;


Workbook workbook = new Workbook();


Worksheet worksheet = workbook.Worksheets[0];


Aspose.Cells.Drawing.LineShape shape = worksheet.Shapes.AddLine(3, 100, 7, 0, 300, 250);


shape.RotationAngle = 270;


workbook.Save(filePath + “.out.xlsx”);